sp_MSforeachtable sproc

LINK: http://weblogs.sqlteam.com/joew/archive/2007/10/23/60383.aspx

Why write a cursor to traverse each table this stored proc allows you to traverse each table automatically:

EXECUTE sp_MSforeachtable ‘EXECUTE sp_spaceused [?];’;

Neat!

——————


Related posts:

  1. Struct Constructor Initialisation I'm working on a personal project atm (more details to...
  2. Rhino vs Moq All i can start with at this stage is wow........

Leave a Reply


The Tomes Of Experience - powered by WordPress (themed by selder) 0.339 seconds.
17:23:58 06-01-2009