TheWizardofInt Posted June 20, 2006 Posted June 20, 2006 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 can't figure it our in Sybase. Their documentation seems to say 'sp_help', however it doesn't 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 Quote Read the Fovean Chronicles Because you just can't spend your whole day programming!
TheWizardofInt Posted June 20, 2006 Author Posted June 20, 2006 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 ID's> Now you have all of the information for each field in each table Quote Read the Fovean Chronicles Because you just can't spend your whole day programming!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.