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 ?'
Get your codes from..
Saturday, May 10, 2008
Execute a single piece of code against all the tables in a database
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment