首页 > 代码库 > SQLServer常用语句

SQLServer常用语句

select * from sys.databases where [database_id]>4

select * from sys.objects where type=‘U‘

SELECT sys.sysobjects.name, sys.sysindexes.rows

FROM sys.sysobjects INNER JOIN

                  sys.sysindexes ON sys.sysobjects.id = sys.sysindexes.id

WHERE (sys.sysobjects.xtype = ‘U‘) AND (sys.sysindexes.indid < 2)

Select * FROM SysColumns Where id=Object_Id(‘沈阳人论坛‘)

SQLServer常用语句