SQL查詢出表、存儲過程、觸發(fā)器的創(chuàng)建時間和最后修改時間示例
更新時間:2015年06月25日 09:21:02 投稿:junjie
這篇文章主要介紹了SQL查詢出表、存儲過程、觸發(fā)器的創(chuàng)建時間和最后修改時間示例,本文直接給出代碼實例,需要的朋友可以參考下
--查詢建立時間 --表 select * from sysobjects where id=object_id(N'表名') and xtype='U' --表的結(jié)構(gòu) select * from syscolumns where id=object_id(N'表名') --存儲過程 select * from sysobjects where id=object_id(N'dqtx') and xtype='P' --查詢最后修改時間 --存儲過程 select name,modify_date from sys.all_objects where name = '存儲過程' and type='P' order by modify_date desc --觸發(fā)器 select name,modify_date from sys.all_objects where name = '存儲過程' and type='TR' order by modify_date desc --表 select * from sys.all_objects where name = '存儲過程' and type='u' order by modify_date desc
相關(guān)文章
利用帶關(guān)聯(lián)子查詢Update語句更新數(shù)據(jù)的方法
這篇文章主要介紹了利用帶關(guān)聯(lián)子查詢Update語句更新數(shù)據(jù)的方法,需要的朋友可以參考下2014-08-08
如何在Navicat新建連接、新建數(shù)據(jù)庫以及導(dǎo)入數(shù)據(jù)庫
Navicat是圖形化操作MySQL的強(qiáng)大工具,但是當(dāng)數(shù)據(jù)庫的服務(wù)器沒有開放3306端口給辦公網(wǎng)絡(luò)時,在辦公網(wǎng)使用navicat連接數(shù)據(jù)庫是連不上的,下面這篇文章主要給大家介紹了關(guān)于如何在Navicat新建連接、新建數(shù)據(jù)庫以及導(dǎo)入數(shù)據(jù)庫的相關(guān)資料,需要的朋友可以參考下2023-05-05
數(shù)據(jù)庫刪除完全重復(fù)和部分關(guān)鍵字段重復(fù)的記錄
重復(fù)記錄分為兩種,第一種是完全重復(fù)的記錄,也就是所有字段均重復(fù)的記錄,第二種是部分關(guān)鍵字段重復(fù)的記錄,例如Name字段重復(fù),而其它字段不一定重復(fù)或都重復(fù)。2008-05-05

