0

I've been tasked to get all the fields in all tables in a Sybase DB. Anyone know how to do this? Thanks in advance.

1

2 Answers 2

2

EXEC sp_columns your_table_name

1

There's also a SAP/Sybase utility called "ddlgen" which can generate a db schema. See:

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc30191.1550/html/utility/CHDBBGGC.htm

Example to extract the schema for a db:

ddlgen -S<server> -U<login> -D<database> -O<output file>

(note, the above example creates a file which contains commands to drop and recreate your database)

Note, you can filter by object type using -T and filter by object name using -N. If you use these options, the schema gets generated with "drop and recreate" commands.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.