怎样用SQL语句查询一个数据库中的所有表

日期:2017-09-04 14:39:52 人气:1

怎样用SQL语句查询一个数据库中的所有表

--读取库中的所有表名 select name from sysobjects where xtype='u' --读取指定表的所有列名 select name from syscolumns where id=(select max(id) from sysobjects where xtype='u' and name='表名') 获取数据库表名和字段 sqlserver中各个系统表的作用 sysaltfiles 主数据库 保存数据库的文件
    A+
热门评论