Suppose we have a table and recently we have added a column on the table. For audit the purpose I want to know when the new columns are added.
See the
example.
I have an
EMP table. There are 4 columns in that table
SELECT o.name,o.type,o.type_desc,o.create_date from sys.tables o where o.name='Emp' |
Now I am
adding one column in this table.
ALTER TABLE
Emp ADD Salary
decimal(28,10) |
Now I want
to see when the new column is added.
With the
help of below sql script we will get when the column is updated or created.
SELECT Object_name(sc.[object_id]) AS [table], |
No comments:
Post a Comment
If you have any doubt, please let me know.