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 |
|
tpiazza55
Posting Yak Master
162 Posts |
Posted - 2011-05-12 : 14:23:33
|
| I have a query select * from table1How do i write one query that will excute the above across all the databases? |
|
|
tmaiden
Yak Posting Veteran
86 Posts |
Posted - 2011-05-12 : 17:21:54
|
| sp_msforeachdb @command1='USE ?;SELECT * from table1' |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2011-05-13 : 06:46:47
|
| i shudder to think WHY you would need to do such a thing....http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|
|
|