what is the DB2 command used to see the schema definition of a given table? I tried sp_help in db2 but it did not work for me.
Asked
Active
Viewed 596 times
2 Answers
1
Try this:
SELECT * FROM sysobjects WHERE type = 'U'
where U
is for user table.
Check this post to have a good understanding
From a Sybase Database, how I can get table description ( field names and types)?
EDIT:
Above mentioned is the best approach. Other than that you can use
-
Rahul, i am looking for a sybase system command used to see the table creation script. for example sp_help gives the details about the table. similarly i wnt to know the command for viewing the script – techi Jul 19 '13 at 19:40
-
sorry this is not what I wanted. I want the name of system stored procedure for viewing the ddl.I got the necessary command do it – techi Jul 19 '13 at 21:05
1
The ddlgen
command can be used to extact all ddl information, into script form. It's usually found in $SYBASE/ASEP/bin
Look at my answer here for more information: Extract SP and DDL Scripts in sybase Server

Community
- 1
- 1

Mike Gardner
- 6,611
- 5
- 24
- 34