Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use SQL to query table information in Sybase ASA 12

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

In the Sybase central tool, we can often see the following pages:

Yesterday, a customer happened to need to export such a copy of table data, so I wrote the following SQL statement to query table information:

SELECT tbl.table_name AS "Name", usr.user_name AS "Owner", 'Table' AS Type,-- because the information is queried for Table, not View, the data in the Type column is always' Table' Here is the hard code remarks AS "Comment" FROM sys.SYSTABLE AS tblLEFT JOIN sys.SYSUSER AS usr ON usr.user_id = tbl.creatorWHERE creator IN (SELECT creator FROM sys.SYSTABLE WHERE table_name='zip2kv'-- We know the name of one of the tables, so just query systable directly, otherwise you'll have to look up the db table)

What's written on this pile? The picture was lost by 51CTO. After such a long time, I don't even know what to write. Let's sort it out, maybe it's of some reference value.

The Sybase ASA 12 database contains system tables that record the Meta information in the business database (the database that the user needs to create because of the business). For example, all database names that exist on the current Sybase ASA are recorded in the system's db table. Sys.SYSTABLE, as its name implies, means that SYSTABLE system tables hold relevant definition information about all the tables in the Sybase ASA database management system. Almost all the Meta information you can use is recorded in the system table with sys as the schema. As long as you look through the corresponding Sybase ASA documents, you should be able to find the information you want.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report