Sybase - derivinging Table structure data

TheWizardofInt

Well-known member
Joined
Dec 31, 1969
Messages
333
Location
Orlando, FL
I need to programatically determine the size, type and name of all of the fields in all of the tables of a large Sybase database.

I know how to do this in MySQL and MS SQL, but cant figure it our in Sybase. Their documentation seems to say sp_help, however it doesnt work programatically

Anyone done this before? Sorry for all of the Sybase questions - this product is pretty poorly documented and I am new to it
 
Never mind. For the next person who needs it:

Fill a datatable with your list of tables:

Select ID, NAME from dbo.SysObjects WHERE Type=U

Then for each row in the datatable:

Select * from dbo.syscolumns WHERE ID= <the id from the datatable containing the Name and IDs>

Now you have all of the information for each field in each table
 
Back
Top