如何查看資料庫 Table,Stored procedure 更新時間
因為現在專案中,常常要 Clone 現有的 instance,這時如果要查 Table 及 Stored procedure 的更新時間,有兩段 Code 可以下
Table 版本:
select [name],create_date,modify_date FROM sys.all_objects where type_desc = 'USER_TABLE'
order by modify_date desc
Stored procedure 版本:
select [name],create_date,modify_date FROM sys.all_objects where type_desc = 'SQL_STORED_PROCEDURE'
and substring([name],1,3) not in ('sp_','dt_','xp_')
order by modify_date desc