SQL Server: Computed Column defintions retrievable from Database? -
i query definition of computed column database, can't find command seems want...
for instance, if column defined as:
calldt (convert([datetime],dateadd(second,[startdate],'01/01/1970'),(0)))
in ddl, run command on database retrieve "as" statement can compare expected value. (i'm developing sql parser compare existing database ddl definition)...
is possible?
this works in sql server 2008
create table dbo.foo ( startdate int, calldt (convert([datetime],dateadd(second,[startdate],'01/01/1970'),(0))) ) select definition sys.computed_columns name='calldt' , object_id=object_id('dbo.foo')
Comments
Post a Comment