June 29, 2005 at 3:11 pm
Hello everyone,
I'm not sure what this data_type does:
sysname
Here's how it's used:
DECLARE @Name sysname
--
Let me know what you guys think.
Thanks,
Himansu
June 29, 2005 at 3:19 pm
From Book Online
sysname data type is nvarchar(128), which allows for 128 Unicode characters.
Expect different results as compared to earlier versions of SQL Server. Expect any columns or local variables defined as sysname to allow Unicode data. For more information about sysname, see Data Types.
In older versions of sql server it was varchar(30).
June 29, 2005 at 3:29 pm
Have you seen any use for this (besides for the system tables)?
June 29, 2005 at 3:39 pm
The only other time I've seen this used is for tables created by vendors whose products reference the system tables. I've never used it for anything.
June 29, 2005 at 3:47 pm
I don't see why I would use that, it's just a custom datatype, nothing more.
June 29, 2005 at 4:01 pm
In the case of this particular data type, using it, in the past would have caused you grief. When the internal definition changed (I think it was in 7.0), then all the tables you would have used it in might have given you strange results (or ugly errors) unless you unloaded, redefined, and reloaded during your upgrade from earlier releases.
I tend to not use custom data types unless there's some integrity reason to do so. I'd rather be able to know what I'm dealing with in DDL without having to look up related stuff. But then again, I'm old and set in my ways, and extrat steps tend to annoy me.
June 29, 2005 at 8:37 pm
I'm young and I agree .
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply