sybase_sql_snippets
This is an old revision of the document!
Table of Contents
Sybase SQL Snippets
Show All User Tables
SELECT * FROM sysobjects WHERE 1 = 1 AND sysobjects.type = 'U' -- user table AND sysobjects.type = 'V' -- view AND sysobjects.type = 'L' -- log AND sysobjects.type = 'P' -- procedure AND sysobjects.type = 'R' -- rule AND sysobjects.type = 'D' -- default AND sysobjects.type = 'TR' -- trigger AND sysobjects.type = 'RI' -- referential constraint ORDER BY sysobjects.name
Show Columns In A Table
SELECT syscolumns.name , * FROM syscolumns JOIN sysobjects ON syscolumns.id = sysobjects.id WHERE sysobjects.name = 'TABLE_NAME' ORDER BY syscolumns.name
sybase_sql_snippets.1257973104.txt.gz · Last modified: 2017/01/01 19:54 (external edit)