Several common SQL functions for querying meta information in Sybase ASA

Source: Internet
Author: User
Tags dba functions sybase unsupported

Several common SQL functions for querying meta information in Sybase ASA:

sp_column_privileges Unsupported
sp_columns table-name [, table-owner ] [, table-qualifier] [, column-name] 返回指定列的数据类型
sp_databases Unsupported
sp_datatype_info Unsupported
sp_fkeys pktable_name [, pktable-owner][, pktable-qualifier] [, fktable-name] [, fktable_owner] [, fktable-qualifier] 表的外键信息
sp_pkeys table-name [, table_owner] [, table_qualifier] 表的主键信息
sp_server_info Unsupported
sp_special_columns table_name [, table-owner] [, table-qualifier] [, col-type] 表的标识行的特定列的信息
sp_sproc_columns proc-name [, proc_owner] [, proc-qualifier] [, column-name] 存储过程的输入输出参数信息
sp_stored_procedures [sp-name] [, sp-owner] [, sp-qualifier] 一个或者多个存储过程信息
sp_statistics [table_name] [, table_owner] [, table_qualities] [, index_name] [, is_unique] 表及其索引列的信息
sp_tables table-name [, table-owner] [, table-qualifier] [, table-type] 指定表的信息

Cases:

1. What are the tables in the query database Jagdemo?

sp_tables
current database,creator,tname,ifif SYSTABLE.table_type = 'B,null
'jagdemo','SYS','SYSARTICLE','SYSTEM TABLE',
'jagdemo','SYS','SYSARTICLECOL','SYSTEM TABLE',
'jagdemo','DBA','account','TABLE',
'jagdemo','SYS','SYSREMOTEUSER','SYSTEM TABLE',
'jagdemo','SYS','SYSSUBSCRIPTION','SYSTEM TABLE',
'jagdemo','SYS','SYSUSERMESSAGES','SYSTEM TABLE',
'jagdemo','SYS','SYSUSERTYPE','SYSTEM TABLE',
'jagdemo','SYS','SYSEXTENT','SYSTEM TABLE',
'jagdemo','SYS','SYSREMOTETYPE','SYSTEM TABLE',
'jagdemo','SYS','SYSSQLSERVERTYPE','SYSTEM TABLE',
'jagdemo','SYS','SYSTYPEMAP','SYSTEM TABLE',
'jagdemo','SYS','SYSUSERLIST','VIEW',
'jagdemo','SYS','SYSCOLAUTH','VIEW',
'jagdemo','SYS','SYSINDEXES','VIEW',
'jagdemo','SYS','SYSUSERAUTH','VIEW',

2. Query table Account column information

sp_columns account
jagdemo DBA account balance 7 real 7 4 0 10 0 59 2
jagdemo DBA account student_id 1 char 16 16 0 0

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.