October 1, 2007 at 5:49 am
dear all
Is there any view in which any column show the default value of any table's column. which is equivalent to cdefault column in syscolumns table. i know information_schema.columns view. is there any other view which shows column default value.
October 1, 2007 at 5:59 am
yep already created view for you. try
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
you'll see it has the definitions for all the columns int he database, including what that default value is.
Lowell
October 1, 2007 at 6:40 am
Sys.columns has a default_object_id. This is the id of the default, which you can access via the sys.default_constraints system view. The sys.default_constraints shows the definition of the default in the "definition" column.
Regards,
Andras
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply