Topic: 关于提取数据库表名的问题?

  Print this page

1.关于提取数据库表名的问题? Copy to clipboard
Posted by: majh_2008
Posted on: 2004-08-11 10:35

Smile各位高手:
请问:怎样从一个数据库中提取出所有用户表的表名?
能以sqlserver2000为例给点提示,意见,方法的,小弟跪求了!

2.Re:关于提取数据库表名的问题? [Re: majh_2008] Copy to clipboard
Posted by: xue_1205
Posted on: 2004-08-11 19:38

不同的数据库提取方式都不一样?
我对sqlserver2000不熟悉。就说一说Oracle吧:
select table_name from dba_tables ;
必须以system或sys用户登录。

3.Re:关于提取数据库表名的问题? [Re: majh_2008] Copy to clipboard
Posted by: scud
Posted on: 2004-08-11 21:55

Select id From sysobjects
Where id = Object_ID( "表名" ) And
sysstat & 15 = 3
------------------------------------------------

Select * From sysobjects
Where sysstat & 15 = 3


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923