|
|
 |
RE: FN-FORUM: Autonumber in sql server
date posted 21st January 2007 16:45
Strings up to 8000 characters use a varchar unless you ened to store
unicode text in which case nvarchar (and it's only 4000 characters
then). This will create a variable length field/column. If you want a
fixed length of 8000 (or 4000) then use char or nchar. This will always
be the length - padded (I think) with spaces.
For sizes greated than 8000(4000) you need to use text or ntext. Or you
could have part1 varchar(8000), part2 varchar(8000) and concatenate them
together if youknow that you just need "a bit more" but still need /
want allt he functions that a varchar type field will give compared to a
text type field.
-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of James
Herrington
Sent: 21 January 2007 16:59
To: Andy Macnaughton-Jones
Subject: Re: FN-FORUM: Autonumber in sql server
Thanks guys, sorted it out now, the properties were locked because i had
set the column as a uniqueidentifier instead of an int. like i said i
havent used SQL Server before (and only am now because of its
integration with VB, still prefer MySQL) and i just assumed that this
was the equivalent of autonumber!
Oh, and whats the best way of storing a string, i'm currently using text
data type but would nchar(10) be better?
Thanks
James=20
--
Freelancers, contractors earn more with Prosperity4 Call 0870 870 4414
or visit www.prosperity4.com and benefit from Inland Revenue approved
expenses today.
To advertise here: http://www.freelancers.net/advertising.html
|
 |
|