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

2024-11-15 06:31:42
推荐回答(3个)
回答1:

SQL : select * from information_schema.tables ORACLE: select table_name from user_tables ACCESS: select name from MSysObjects where type=1 and flags=0希望采纳谢谢~!

回答2:

SELECT * FROM sysobjects s WHERE s.xtype='U'

回答3:

如果是mysql 就用 use databasename;show tables;如果是sqlserver 就用 select * from sysobjects where xtype='U'如果是oracle 就用 select * from tabs