Home All Groups Group Topic Archive Search About
Author
6 Jan 2006 6:56 PM
Brian Henry
What the heck does sysname do? There is nothing in the documentation besides
saying "its a system name"... that doesnt tell me much at all. thanks!

Author
6 Jan 2006 7:07 PM
Dan Guzman
Sysname is a system-supplied user-defined datatype.  It's a synonym for
nvarchar(128) and is appropriate for SQL Server identifiers, like object and
column names.

--
Hope this helps.

Dan Guzman
SQL Server MVP

Show quote
"Brian Henry" <nospam@nospam.com> wrote in message
news:%23tKFfLvEGHA.2184@TK2MSFTNGP10.phx.gbl...
> What the heck does sysname do? There is nothing in the documentation
> besides saying "its a system name"... that doesnt tell me much at all.
> thanks!
>
Author
8 Jan 2006 5:49 PM
Damien
And it moves your code towards being self-documenting which I'm all for ie if
you have a SYSNAME column you're saying "I'm going to store an object name
which has to meet the rules for SQL identifer in here" so it's more
meaningful than an NVARCHAR(128).


Damien

Show quote
"Dan Guzman" wrote:

> Sysname is a system-supplied user-defined datatype.  It's a synonym for
> nvarchar(128) and is appropriate for SQL Server identifiers, like object and
> column names.
>
> --
> Hope this helps.
>
> Dan Guzman
> SQL Server MVP
>
> "Brian Henry" <nospam@nospam.com> wrote in message
> news:%23tKFfLvEGHA.2184@TK2MSFTNGP10.phx.gbl...
> > What the heck does sysname do? There is nothing in the documentation
> > besides saying "its a system name"... that doesnt tell me much at all.
> > thanks!
> >
>
>
>
Author
9 Jan 2006 8:42 AM
Tibor Karaszi
I had some code back in the 6.5 days where I used varchar(30) for storing table names etc. Then 7.0
came and changed the rules, so I had to go update my code. If I would have used sysname from the
beginning, I would have saved me a few hours of coding and testing.
(Not that I expect this to change in a bunch of releases, if ever. :-))

Show quote
"Damien" <Dam***@discussions.microsoft.com> wrote in message
news:4E871DAB-3431-44E2-BD1B-03D806CC4F39@microsoft.com...
> And it moves your code towards being self-documenting which I'm all for ie if
> you have a SYSNAME column you're saying "I'm going to store an object name
> which has to meet the rules for SQL identifer in here" so it's more
> meaningful than an NVARCHAR(128).
>
>
> Damien
>
> "Dan Guzman" wrote:
>
>> Sysname is a system-supplied user-defined datatype.  It's a synonym for
>> nvarchar(128) and is appropriate for SQL Server identifiers, like object and
>> column names.
>>
>> --
>> Hope this helps.
>>
>> Dan Guzman
>> SQL Server MVP
>>
>> "Brian Henry" <nospam@nospam.com> wrote in message
>> news:%23tKFfLvEGHA.2184@TK2MSFTNGP10.phx.gbl...
>> > What the heck does sysname do? There is nothing in the documentation
>> > besides saying "its a system name"... that doesnt tell me much at all.
>> > thanks!
>> >
>>
>>
>>

AddThis Social Bookmark Button