摘要:--这是查询所有表的信息select * from sysobjects where xtype='U'; --这是查询表的数量select count(*) from sysobjects where xtype='U' --这是快速查询所有表中的数据量SELECT a.name , ...
阅读全文
随笔分类 - .. 常用代码: Sql Server
摘要:--这是查询所有表的信息select * from sysobjects where xtype='U'; --这是查询表的数量select count(*) from sysobjects where xtype='U' --这是快速查询所有表中的数据量SELECT a.name , ...
阅读全文
摘要:--查看partition的四个视图select * from sys.partition_functions--查看分区函数select * from sys.partition_parametersselect * from sys.partition_range_values--查看分区函数对...
阅读全文
摘要:***************************--判断数据库是否存在 IF EXISTS (SELECT * FROM MASTER..sysdatabases WHERE NAME = '库名') PRINT 'exists ' else PRINT 'not exists'...
阅读全文
|