sybase_sql_snippets
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sybase_sql_snippets [2009/11/11 20:58] – stephen | sybase_sql_snippets [2017/01/01 20:05] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Sybase SQL Snippets ====== | ====== Sybase SQL Snippets ====== | ||
| - | ===== Show All User Tables | + | ===== Get Info from SysObjects |
| <code sql> | <code sql> | ||
| SELECT | SELECT | ||
| FROM | FROM | ||
| WHERE 1 = 1 | WHERE 1 = 1 | ||
| - | AND sysobjects.type = ' | + | --AND sysobjects.type = ' |
| - | AND sysobjects.type = ' | + | --AND sysobjects.type = ' |
| - | AND sysobjects.type = ' | + | --AND sysobjects.type = ' |
| - | AND sysobjects.type = ' | + | --AND sysobjects.type = ' |
| - | AND sysobjects.type = ' | + | --AND sysobjects.type = ' |
| - | AND sysobjects.type = ' | + | --AND sysobjects.type = ' |
| - | AND sysobjects.type = ' | + | --AND sysobjects.type = ' |
| - | AND sysobjects.type = ' | + | --AND sysobjects.type = ' |
| ORDER BY sysobjects.name | ORDER BY sysobjects.name | ||
| </ | </ | ||
| Line 25: | Line 25: | ||
| WHERE sysobjects.name = ' | WHERE sysobjects.name = ' | ||
| ORDER BY syscolumns.name | ORDER BY syscolumns.name | ||
| + | </ | ||
| + | |||
| + | ===== Search All Column Names ===== | ||
| + | |||
| + | <code sql> | ||
| + | SELECT | ||
| + | , syscolumns.name | ||
| + | , * | ||
| + | FROM | ||
| + | JOIN | ||
| + | WHERE syscolumns.name like ' | ||
| + | ORDER BY sysobjects.name ASC | ||
| + | , syscolumns.name ASC | ||
| </ | </ | ||
| {{tag> | {{tag> | ||
sybase_sql_snippets.1257973104.txt.gz · Last modified: 2017/01/01 19:54 (external edit)
