cancel
Showing results for 
Search instead for 
Did you mean: 

Table Description

Former Member
3,291

Is there a way to get a description of a table or database object in isql besides copy/paste from sybase central? If I recall there is something similiar in MySQL, like DESC.

Accepted Solutions (1)

Accepted Solutions (1)

DESCRIBE [ [ INDEX FOR ] TABLE | PROCEDURE ] [ owner.]object-name

object-name: table, view, materialized view, procedure, or function

graeme_perrow
Advisor
Advisor

Note that this is only available through dbisql. It is not a SQL statement.

Answers (2)

Answers (2)

Former Member

If your using SA 11.0.1 or above, you can also use sa_get_table_definition(). See: http://dcx.sybase.com/index.html#1101en/dbreference_en11/sa-get-table-definition-sysproc.html

VolkerBarth
Contributor
0 Kudos

Just wanted to test this fine enhancement, and - oops, - "procedure not found", as my SA 11.0.1 production database hasn't been reloaded from V11.0.0, so the proc isn't available. (Yes, I could upgrade the database.)

VolkerBarth
Contributor

Besides Vincent's suggestion, you can always query the system catalog to get information about any kind of database object.

For views, procedures and functions, this will also allow to get the description (i.e. the source code) and not just the list of columns/parameters as DESCRIBE does.

As you can use regular SQL queries to query the system catalog, you're free to select and join those system tables/views to extract every detail you're interested in.

Here's a good starting point in the V12 docs.

This question shows some examples, too.