Jan 2, 2014

Sql query to list all the user defined tables in database which has been modified before or after given table in sql server


Sql query or script to list out or get all the user defined tables in database which has been modified before or after given or specified table in sql server

Sql query to get the list of tables which has modified after the specified date.

SELECT name FROM sys.tables WHERE modify_date >= '2011-11-05'

Sql query to get the list of tables which has modified before the specified date.

SELECT name FROM sys.tables WHERE modify_date <= '2011-11-05'

Here sys.tables is system view. sys.tables keeps only user defined tables.

modify_date: It is datetime type column which keeps the information regarding the last date of modification of schema of any table in the database.

No comments:

Post a Comment