Welcome guys..

This is programmer sharing his collection with all you ppl out there. This blog contains complete codes of java , c , c++ , unix , java script , applets , swing for learning purpose only. I try to add approx 10 new complete codes daily. Lets share out knowledge and materials in here. All your comments and votes are most welcomed.

Get your codes from..

Saturday, May 10, 2008

Execute a single piece of code against all the tables in a database

chk it this out guys...sp_MSForEachTable is an undocumented stored procedure using which u can run a single piece of code against a the tables in the database

EXEC sp_MSForEachTable ' SELECT ''?'' AS TABLENAME EXEC sp_helpindexes ''?'''

EXEC sp_MSForEachTable 'SELECT ''?'' AS tblName, * FROM ?'

No comments:

Project Source Codes