|
-
Nov 16th, 2019, 02:34 AM
#11
Re: How to Sort Data Bound Combobox
 Originally Posted by ahmish
what about?
Nchar?
You don't need to ask us questions like that. You just need to read the relevant documentation and decide which description matches the type of data that you want to store. If you don't know what data type to use then you either don't understand the data types - in which case you should be reading up on the data types - or you don't understand your data.
char: fixed-length, single-byte
nchar: fixed-length, multi-byte
varchar: variable-length, single-byte
nvarchar: variable-length, multi-byte
You only have to ask yourself two question about your text data and the answers determine which data type to use. Although you can, it is rare that you would use a fixed-length data type for variable-length data because any value that is shorter will be padded with spaces and it's then up to you to remove them every time you retrieve the data. I generally only use fixed-length data types when the data is genuinely fixed-length, e.g. codes for US states. I think that fixed-length may actually be more efficient even if the data isn't always the same size, as long as the variation as small.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|