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 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.) |
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. |