Where are the default values for a column stored in SQL Server. I thought
they would be in the syscolumns table, but I cannot find them there, nor
anywhere else for that matter.
Thanks,
Jasonget the cdefault from syscolumns and
select from syscomments for the id
syscomments.id = syscolumns.cdefault.
Let me know if this helps
"JasonDWilson" wrote:
> Where are the default values for a column stored in SQL Server. I thought
> they would be in the syscolumns table, but I cannot find them there, nor
> anywhere else for that matter.
> Thanks,
> --
> Jason|||Try this:
select distinct substring(object_name(c.id), 1, 50) 'Table Name'
, substring(c.name, 1, 40) 'Column Name'
, object_name(c.cdefault)'Default Name'
from syscolumns c,
syscomments m
where m.id = c.cdefault
Perayu
"JasonDWilson" <JasonDWilson@.discussions.microsoft.com> wrote in message
news:E45274CE-E559-40E0-805E-7DD5037D90BD@.microsoft.com...
> Where are the default values for a column stored in SQL Server. I thought
> they would be in the syscolumns table, but I cannot find them there, nor
> anywhere else for that matter.
> Thanks,
> --
> Jason
No comments:
Post a Comment