Home > Database > Mysql Tutorial > body text

SQL Server获取所有数据库名、表名以及字段名

WBOY
Release: 2016-06-07 14:56:35
Original
796 people have browsed it

SQL Server获取所有数据库名、表名以及字段名 无 Select Name FROM Master..SysDatabases order by Name Select Name FROM SysObjects Where XType='U' ORDER BY Name Select Name FROM SysColumns Where id=Object_Id('TableName') SELECT syscolumns.name,s

SQL Server获取所有数据库名、表名以及字段名
Select Name FROM Master..SysDatabases order by Name   
Copy after login
Select Name FROM SysObjects Where XType='U' ORDER BY Name
Copy after login
Select Name FROM SysColumns Where id=Object_Id('TableName')
Copy after login
SELECT syscolumns.name,systypes.name,syscolumns.isnullable,syscolumns.length FROM syscolumns, systypes WHERE syscolumns.xusertype = systypes.xusertype AND syscolumns.id = object_id('tableName')
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template