Using SQL to query table information in Sybase ASA 12

Source: Internet
Author: User
Tags sybase

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

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/89/67/wKiom1gRyE_zM-JyAABH3iPUDEM213.png "title=" Sybasecentral001.png "style=" border:1px solid #000000; "alt=" Wkiom1grye_zm-jyaabh3ipudem213.png "/>

There was a client who had to export such a table data yesterday, so I wrote the following SQL statement to query the table information:

Select Tbl.table_name as "name", Usr.user_name as "Owner", "table" as Type,--because the query is table information, not view, so the type column Data has always been ' Table ', where hard code is 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 table name of one of the tables, so it's good to query systable directly, otherwise we have to check the DB table);


This article is from the "Bitterjava" blog, make sure to keep this source http://rickqin.blog.51cto.com/1096449/1866418

Using SQL to query table information in Sybase ASA 12

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.