I have two database student and student1
i want to display all table name and storedprocedures extsts in student but not in student1
Display all table name and storedprocedures
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Krishna GaradRank #191 · 12.8K reputationPosted Mar 18, 2011, 8:30 PM EDT
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
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Mar 18, 2011, 8:30 PM EDT
Try this
select * from information_schema.tables where table_type = 'base table'
select * from sysobjects where type='p'
the above query worked .