您的位置:首页 > 数据库

MSSQL common functions and concepts

2012-09-24 15:26 211 查看
1. In technical terms, a table without an index is called a “heap”.

2. Common functions.

select db_id(N'Product'); -- Get DB id
select object_id('test.dbo.PerformanceIssue') -- Get Table id
select * from sysobjects where id= object_id('PerformanceIssue') and type = 'U' -- Get table info
dbcc ind('Test', 'PerformanceIssue', -1) -- Get indexes info (dbname, tablename, -1)
select @@version -- check mssql version if it is dev edition.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: