发表主题回复主题
1/10‹‹1››

读取数据库里的所有用户表名

凉血

UID:547

只看楼主   ¦        #1
  • 等级:5级
  • 昵称:神经正常
  • 组别:中级会员
  • 积分:533
  • 金币:261

1. SQL Server:
select * from sysobjects where type = 'U'
或者
SELECT * FROM INFORMATION_SCHEMA.TABLES where table_type = 'base table'
2. Access:
SELECT MSysObjects.Name, MSysObjects.Type
FROM MSysObjects
WHERE (((MSysObjects.Name) Not Like "msys*") AND ((MSysObjects.Type)=1))
3. Oracle:
a. To list all tables under your ORACLE account:
select table_name from user_tables;
b. To list all tables that are accessible to you, but may be owned different
ORACLE accounts:
select table_name ,owner from all_tables;
c. If you system password and list all tables created by all users, including
SYS, SYSTEM:
select table_name,owner from dba_tables;
Time: 07-09-13 13:46

 
›› 举报 ¦ 奖励 ¦ 引用 ¦  TOP   
发表主题回复主题
1/10‹‹1››