all groups > sql server new users > april 2005 >
You're in the

sql server new users

group:

defining description field


Re: defining description field Hugo Kornelis
4/25/2005 12:00:00 AM
sql server new users:
[quoted text, click to view]

Hi r,

Use varchar(??), where you replace ?? with the maximum allowed length (the
maximum value you can use is 8000). The var stands for "varying length";
it means that no more bytes are used to store the data than the actual
length (+ 2, to store the current length).

If you have to support Unicode characters, use nvarchar(??) instead. This
takes two bytes per character in the data (+ 2 for the length) and the
maximum length you may specfify is 4000.

Groetjes, Hugo
--

defining description field r
4/25/2005 1:46:53 PM
I need to add a description field in a table - the length of the field will
vary for each record. What is the best datatype and field length to use in
a case like this??

Re: defining description field Walter Clayton
4/25/2005 5:24:06 PM
varchar or text depending on your needs. Length is entirely a business
decision that you'll need to make. Alternatively create a separate comments
table and just join the two when needed.

--
Walter Clayton
Any technology distinguishable from magic is insufficiently advanced.


[quoted text, click to view]
AddThis Social Bookmark Button