Friday, February 24, 2012

Default values

Is there a way to check to see if a default value exists for an existing
column in a table using SQL script? If so, how?http://www.aspfaq.com/2177
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Robert" <netsec4u@.hotmail.com> wrote in message
news:OHQx#K9eEHA.2804@.TK2MSFTNGP11.phx.gbl...
> Is there a way to check to see if a default value exists for an existing
> column in a table using SQL script? If so, how?
>|||SELECT column_default
FROM information_schema.columns
WHERE table_name = 'TABLE_NAME'
AND column_name = 'COLUMN_NAME'
--
David Portas
SQL Server MVP
--

No comments:

Post a Comment