查询所有数据库,数据集

use master ;

查询数据库:
select * from sysdatabases where dbid>4 ;
查询表:
SELECT * FROM SysObjects Where XType=U ORDER BY Name
查询列:
select b.name as tableName,a.name as columnName,c.name as columnType,a.length as columnLength from syscolumns a inner join sysobjects b on a.id=b.id inner join systypes c on a.xtype=c.xtype WHERE a.id=OBJECT_ID(N[表名]) And c.name not like sysname ORDER BY colid

查询所有数据库,数据集,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。