Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
OBINNA_EKE
Posting Yak Master
234 Posts |
Posted - 2006-04-11 : 09:41:46
|
| How do I loop through a database and display all the table name in itthen useSP_ChangeObjectOwner "TABLE_NAME","dbo"where table_owner is OBIIn a nut shell, how do I loop through a database and isplay name ? |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-04-11 : 09:49:49
|
| using Select * From Master..Sysdatabases you will get list of all the databases attached on the server. using Select * From Information_Schema.Tables you will get list of all the tables of the database. using cursor and dynamic sql you can loop through all the tables and run the procedure.If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them. |
 |
|
|
|
|
|