cancel
Showing results for 
Search instead for 
Did you mean: 

ISQL DESCRIBE TABLE

Former Member
0 Kudos

Dear experts,

I want to show the script of creation of a specficic table in SAP ERP6 EHP7 on ASE 15.7. i proceded as below :


1> describe table  SAPSR3.ZPAB_ECHANGE

2> go

Msg 156, Level 15, State 2:

Server 'DEV', Line 1:

Incorrect syntax near the keyword 'table'.

I cannot find any documentation which explain how to get creation table script with isql command.

Any help, please ?

Thnaks in advance..

former_member188958
Active Contributor
0 Kudos


Adding to Mark's list, there is Ed Barlow's collection of stored procedures (shareware, I believe) available on the web that includes one sp__revtable that generated DDL for a table - though I'm not sure the version out there includes all the latest features.  But it would be a good start for creating your own, if nothing else.  Check out. GEM EXTENDED STORED PROCEDURES

-bret

Accepted Solutions (1)

Accepted Solutions (1)

JanStallkamp
Employee
Employee
0 Kudos

Hi.

As Mark already said: sp_help in isql will give you a good description of any given database table (but also on most other objects inside the database.

In an SAP environment you can also check:

The ABAP DDIC transcations: Tx SE11 -> Enter TableName -> Display

Then you can navigate to Utilities -> Database Object -> Display which will you show you information on datatypes, nullability, defaults on the DB.

Or Utilities -> Database Object -> Database Utility (aka SE14): "Storage Parameters" shows you information on compression and partitions

The easier way to get this information is in DBA Cockpit: Space -> Single Table Analysis shows you close to everything about a given table on the database.

Both DBACockpit and the DDIC transactions don't show you the SQL used for the creation of the table. But in general you should not create any tables on the database bypassing the DDIC anyway.

Regards,

Jan

Answers (1)

Answers (1)

Former Member
0 Kudos

Jan is correct in not messing up with the content of your system, but...

In case you need to extract ddl for you database objects, check the official SAP Sybase documentation on ddlgen and defncopy tools shipped with each ASE installation.  These will do the job for you - much better than sp_help &c.

HTH,

Andrew