请问sybase里怎么列举所有视图?
<p>我现在知道怎么用SQl语句列举表了,可以用:select object_name(id),rowcnt(doampg) from sysindexes where indid=0</p><p>但是谁能告诉我怎么列举视图和索引吗?谢谢!</p><p> </p> <p>select name from sysobjects where type='U' <br/>//查询当前数据库中的所有表 <br/></p><p>select name from sysobjects where type='P' <br/>//查询当前数据库中所有的Stored procedure</p><p>select name from sysobjects where type='V'</p><p>//查询当前数据库中所有的View</p> <h2><a name="_sysobjects_.28.all_databases.29"></a>sysobjects (T-SQL)</h2><p>Contains one row for each object (constraint, default, log, rule, stored procedure, and so on) created within a database. In <b>tempdb</b> only, this table includes a row for each temporary object.</p><table cellspacing="0" cols="3" width="463"><tbody><tr valign="top"><th align="left" width="22%">Column name</th><th align="left" width="22%">Data type</th><th align="left" width="56%">Description</th></tr><tr valign="top"><td width="22%"><b>name</b></td><td width="22%"><b>sysname</b></td><td width="56%">Object name.</td></tr><tr valign="top"><td width="22%"><b>Id</b></td><td width="22%"><b>int</b></td><td width="56%">Object identification number.</td></tr><tr valign="top"><td width="22%"><b>xtype</b></td><td width="22%"><b>char(2)</b></td><td width="56%">Object type. Can be one of these object types:<br/>C = CHECK constraint<br/>D = Default or DEFAULT constraint<br/>F = FOREIGN KEY constraint<br/>L = Log<br/>P = Stored procedure<br/>PK = PRIMARY KEY constraint (type is K)<br/>RF = Replication filter stored procedure <br/>S = System table<br/>TR = Trigger<br/>U = User table<br/>UQ = UNIQUE constraint (type is K)<br/>V = View<br/>X = Extended stored procedure</td></tr><tr valign="top"><td width="22%"><b>uid</b></td><td width="22%"><b>smallint</b></td><td width="56%">User ID of owner object.</td></tr><tr valign="top"><td width="22%"><b>info</b></td><td width="22%"><b>smallint</b></td><td width="56%">Reserved. For internal use only.</td></tr><tr valign="top"><td width="22%"><b>status</b></td><td width="22%"><b>int</b></td><td width="56%">Reserved. For internal use only.</td></tr><tr valign="top"><td width="22%"><b>base_schema_ver</b></td><td width="22%"><b>int</b></td><td width="56%">Count of changes in schema of a given object (incremented if a rule or default is added).</td></tr><tr valign="top"><td width="22%"><b>replinfo</b></td><td width="22%"><b>int</b></td><td width="56%">Reserved. For use by replication.</td></tr><tr valign="top"><td width="22%"><b>parent_obj</b></td><td width="22%"><b>int</b></td><td width="56%">Object identification number of parent object (for example, the table ID if a trigger or constraint).</td></tr><tr valign="top"><td width="22%"><b>crdate</b></td><td width="22%"><b>datetime</b></td><td width="56%">Date the object was created.</td></tr><tr valign="top"><td width="22%"><b>ftcatid</b></td><td width="22%"><b>smallint</b></td><td width="56%">Identifier of the full-text catalog for all user tables registered for full-text indexing, and 0 for all user tables not registered. </td></tr><tr valign="top"><td width="22%"><b>schema_ver</b></td><td width="22%"><b>int</b></td><td width="56%">Version number that is incremented every time the schema for a table changes.</td></tr><tr valign="top"><td width="22%"><b>stats_schema_ver</b></td><td width="22%"><b>int</b></td><td width="56%">Version number of the statistics.</td></tr><tr valign="top"><td width="22%"><b>type</b></td><td width="22%"><b>char(2)</b></td><td width="56%">Object type. Can be one of these values: <br/>C = CHECK constraint <br/>D = Default or DEFAULT constraint<br/>F = FOREIGN KEY constraint <br/>K = PRIMARY KEY or UNIQUE constraint <br/>L = Log<br/>P = Stored procedure<br/>R = Rule<br/>RF = Replication filter stored procedure<br/>S = System table <br/>TR = Trigger<br/>U = User table<br/>V = View<br/>X = Extended stored procedure</td></tr><tr valign="top"><td width="22%"><b>userstat</b></td><td width="22%"><b>smallint</b></td><td width="56%">Reserved.</td></tr><tr valign="top"><td width="22%"><b>sysstat</b></td><td width="22%"><b>smallint</b></td><td width="56%">Internal status information.</td></tr><tr valign="top"><td width="22%"><b>indexdel</b></td><td width="22%"><b>smallint</b></td><td width="56%">Index delete count (incremented if an index is deleted).</td></tr><tr valign="top"><td width="22%"><b>refdate</b></td><td width="22%"><b>datetime</b></td><td width="56%">Reserved for future use.</td></tr><tr valign="top"><td width="22%"><b>version</b></td><td width="22%"><b>int</b></td><td width="56%">Reserved for future use.</td></tr><tr valign="top"><td width="22%"><b>deltrig</b></td><td width="22%"><b>int</b></td><td width="56%">Reserved.</td></tr><tr valign="top"><td width="22%"><b>instrig</b></td><td width="22%"><b>int</b></td><td width="56%">Reserved.</td></tr><tr valign="top"><td width="22%"><b>updtrig</b></td><td width="22%"><b>int</b></td><td width="56%">Reserved.</td></tr><tr valign="top"><td width="22%"><b>seltrig</b></td><td width="22%"><b>int</b></td><td width="56%">Reserved.</td></tr><tr valign="top"><td width="22%"><b>category</b></td><td width="22%"><b>int</b></td><td width="56%">Used for publication, constraints, and identity.</td></tr><tr valign="top"><td width="22%"><b>cache</b></td><td width="22%"><b>smallint</b></td><td width="56%">Reserved.</td></tr></tbody></table>
页:
[1]