select * from sysobjects where (xtype = 'u')
select * from sysobjects where (xtype = 'u')
select * from sysobjects where (xtype = 'c')
select * from sysobjects where (xtype = 'd')
select * from sysobjects where (xtype = 'f')
select * from sysobjects where (xtype = 'l')
select * from sysobjects where (xtype = 'fn')
select * from sysobjects where (xtype = 'if')
select * from sysobjects where (xtype = 'p')
select * from sysobjects where (xtype = 'pk')
select * from sysobjects where (xtype = 'rf')
select * from sysobjects where (xtype = 's')
select * from sysobjects where (xtype = 'tr')
select * from sysobjects where (xtype = 'u')
select * from sysobjects where (xtype = 'uq')
select * from sysobjects where (xtype = 'v')
select * from sysobjects where (xtype = 'x')
--c = check 約束
--d = 預設值或 default 約束
--f = foreign key 約束
--l = 日誌 --fn = 標量函式
--if = 內嵌表函式
--p = 儲存過程
--pk = primary key 約束(型別是 k)
--rf = 複製篩選儲存過程
--s = 系統表
--tf = 表函式
--tr = 觸發器
--u = 使用者表
--uq = unique 約束(型別是 k)
--v = 檢視
--x = 擴充套件儲存過程
SQL Server資料庫查詢
開啟我們的sql server資料庫,找到要查詢的資料庫表,右鍵單擊然後選擇新建查詢,select 選擇我們要查詢的表sys academe學院表 聯合 sys class.classname班級表的班級名稱和sys grade.gradename年級表的年級編號來查詢出資料。下面是查詢的 sele...
SQL Server 跨資料庫查詢
語句 select from 資料庫a.dbo.表a a,資料庫b.dbo.表b b where a.field b.field dbo 可以省略 如 select from 資料庫a.表a a,資料庫b.表b b where a.field b.field sqlserver資料庫 這句是對映乙個...
查詢SQL SERVER 資料庫版本
select substring cast serverproperty productversion as nvarchar 128 1,charindex cast serverproperty productversion as nvarchar 128 1 1 8 對應 sql server...