查询数据库所有表内容信息
2024-04-30 12:26:42问答浏览:4574次
最新回答:可以通过以下方法解决问题:
我要提问
登录后回复
共 4 个回答
-
读取库中的所有表名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 主数据库 保。赞78回复举报
-
SQL Server 1 select name from sysobjects where type = ' U ' -- 表 2 sp_columns ' TableName ' -- 字段信息 3 SELECT [name] FROM SysColumns WHERE id=Object_Id ( 'TableName' ) SQLite 1 select name from sqlite_master where type = ' table ' -- 表 2 PRAGMA table_info( [ TableName ] ) -- 字段信息 MySQL select * from information_schema.tables --。赞45回复举报
我也是有底线的人~
点击加载更多
最新资讯
更多相关资讯
更多热门新闻
-
由他2003位用户围观了该问题
-
肖肖474位用户围观了该问题
-
那一抹蓝465位用户围观了该问题