祝愿大家身体健康!

 站点注册  找回密码
 站点注册

QQ登录

只需一步,快速开始

查看: 4575|回复: 2

请问sybase里怎么列举所有视图?

[复制链接]

请问sybase里怎么列举所有视图?

[复制链接]
anjx

主题

0

回帖

1

积分

新手上路

积分
1
贡献
在线时间
小时
2006-4-25 17:57:43 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?站点注册

×

我现在知道怎么用SQl语句列举表了,可以用:select object_name(id),rowcnt(doampg) from sysindexes where indid=0

但是谁能告诉我怎么列举视图和索引吗?谢谢!

 

共享共进共赢Sharing And Win-win Results
SYBASEBBS - 免责申明1、欢迎访问“SYBASEBBS.COM”,本文内容及相关资源来源于网络,版权归版权方所有!本站原创内容版权归本站所有,请勿转载!
2、本文内容仅代表作者观点,不代表本站立场,作者自负,本站资源仅供学习研究,请勿非法使用,否则后果自负!请下载后24小时内删除!
3、本文内容,包括但不限于源码、文字、图片等,仅供参考。本站不对其安全性,正确性等作出保证。但本站会尽量审核会员发表的内容。
4、如本帖侵犯到任何版权问题,请立即告知本站 ,本站将及时删除并致以最深的歉意!客服邮箱:admin@sybasebbs.com
yunnet23

主题

0

回帖

6

积分

新手上路

积分
6
贡献
在线时间
小时
2006-5-12 22:28:57 | 显示全部楼层

select name from sysobjects where type='U'
//查询当前数据库中的所有表

select name from sysobjects where type='P'
//查询当前数据库中所有的Stored procedure

select name from sysobjects where type='V'

//查询当前数据库中所有的View

共享共进共赢Sharing And Win-win Results
yunnet23

主题

0

回帖

6

积分

新手上路

积分
6
贡献
在线时间
小时
2006-5-12 22:30:23 | 显示全部楼层

sysobjects (T-SQL)

Contains one row for each object (constraint, default, log, rule, stored procedure, and so on) created within a database. In tempdb only, this table includes a row for each temporary object.

Column nameData typeDescription
namesysnameObject name.
IdintObject identification number.
xtypechar(2)Object type. Can be one of these object types:
C = CHECK constraint
D = Default or DEFAULT constraint
F = FOREIGN KEY constraint
L = Log
P = Stored procedure
PK = PRIMARY KEY constraint (type is K)
RF = Replication filter stored procedure
S = System table
TR = Trigger
U = User table
UQ = UNIQUE constraint (type is K)
V = View
X = Extended stored procedure
uidsmallintUser ID of owner object.
infosmallintReserved. For internal use only.
statusintReserved. For internal use only.
base_schema_verintCount of changes in schema of a given object (incremented if a rule or default is added).
replinfointReserved. For use by replication.
parent_objintObject identification number of parent object (for example, the table ID if a trigger or constraint).
crdatedatetimeDate the object was created.
ftcatidsmallintIdentifier of the full-text catalog for all user tables registered for full-text indexing, and 0 for all user tables not registered.
schema_verintVersion number that is incremented every time the schema for a table changes.
stats_schema_verintVersion number of the statistics.
typechar(2)Object type. Can be one of these values:
C = CHECK constraint
D = Default or DEFAULT constraint
F = FOREIGN KEY constraint
K = PRIMARY KEY or UNIQUE constraint
L = Log
P = Stored procedure
R = Rule
RF = Replication filter stored procedure
S = System table
TR = Trigger
U = User table
V = View
X = Extended stored procedure
userstatsmallintReserved.
sysstatsmallintInternal status information.
indexdelsmallintIndex delete count (incremented if an index is deleted).
refdatedatetimeReserved for future use.
versionintReserved for future use.
deltrigintReserved.
instrigintReserved.
updtrigintReserved.
seltrigintReserved.
categoryintUsed for publication, constraints, and identity.
cachesmallintReserved.
共享共进共赢Sharing And Win-win Results
您需要登录后才可以回帖 登录 | 站点注册

本版积分规则

免责声明:
本站所发布的一切破解补丁、注册机和注册信息及软件的解密分析文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To:Admin@SybaseBbs.com

QQ|Archiver|PowerBuilder(PB)BBS社区 ( 鲁ICP备2021027222号-1 )

GMT+8, 2024-12-4 17:10 , Processed in 0.081451 second(s), 11 queries , MemCached On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表