I have two database student and student1
i want to display all table name and storedprocedures extsts in student but not in student1
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaganathan BantheswaranPosted Mar 19, 2011, 12:30 AM
Try this
select * from information_schema.tables where table_type = 'base table'
select * from sysobjects where type='p'
the above query worked .
Krishna GaradPosted Mar 19, 2011, 12:30 AM
select * from sysobjects where xtype='u' // for user defined tables
select * from sysobjects where xtype='p'// for stored procedure
select * from sysobjects where xtype='f''//for function
select * from sysobjects where xtype='v'//for view