A co-worker recently introduced me to sp_MSforeachtable system stored procedure in SQL Server. I was suprised to find that it has been available for years and I am just now figuring that out. I usually use a cursor to iterate through tables using system objects but I think that this would be much easier to use. As an undocumented stored procedure, I knew that this was a "use at your own risk" but I thought I'd do a little research anyway on the proc to see what kind of things people are doing with this proc and found this forum
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2920286&SiteID=1
stating that sp_MSForEachDb and sp_ForEachTable are both on the deprecation list. Too bad. I wonder what they will replace these procedures with.
Tuesday, April 22, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment