MSSQL common functions and concepts

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.
posted @ 2012-09-24 15:26  webglcn  阅读(125)  评论(0编辑  收藏  举报