Created
January 10, 2017 03:05
-
-
Save camark/0e503b23aa6c06aa3f930d144b999fd6 to your computer and use it in GitHub Desktop.
得到SQL Server所有的表名和某个表的所有字段信息
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #SQLServer查询某数据库所有表的表名: | |
| select name from sysobjects where xtype='U'; | |
| #sqlserver查询某表的表结构: | |
| SELECT syscolumns.name,systypes.name,syscolumns.isnullable, syscolumns.length | |
| FROM syscolumns, systypes | |
| WHERE syscolumns.xusertype = systypes.xusertype AND syscolumns.id = object_id('表名') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment