Usually, we need to design SQL table manually, and we need define some columns with specified datatype for each column.
but there always have some misunderstand for NVARCHAR column, we don't known how long we need to set for NVARCHAR, if we set to max, i will extend too mush space.
so, there is some suggestion about how long of those columns' length for NVARCHAR,
Columens | Type | Comment |
Id | uniqueidentifier | if your Id is a Guid, you should make the column type as a uniqueidentifier |
RowId | nvarchar(36) | if your Id is a Guid, but you want to store is as a nvarchar, you can set the n to 36 |
Url | nvarchar(255) | Url is depend on the brosow, but here, we suggest url length is less than 255 |
UserName | nvarchar(128) | userName is also be limited by windows, check reference from here |
Password | nvarchar(512) | if your password is encrypted, you need make it longer, here is just a suggestion. |
FilePath | nvarchar(255) | file path also depend on windows, check reference from here |
here is just some suggestion, if i have found something new common columns, i will update this artical.