When Column Was Added In Table In SQL Server

/****** When column was added in table **************/
SELECT obj.Name , obj.type , col.name ,obj.create_date
from sys.objects obj
inner join sys.columns col on obj.object_Id=col.object_Id
order by obj.create_date desc
----WHERE col.name = 'columnName' -- Specify column name
----and obj.Name='tableName'   -- Specify table name

--Note: This will return null if SQL server restarted and after that data is not accessed

Link to: Frequently Used Queries For Audit In Sql Server

1 comment: