Thanks a lot for the lovely teaching.
This proc was ran against Adventureworks2008 without changing anything in the original code.
Do I need to change @TableName to any name in the Adventureworks2008 table? Because when I ran the code I got an error like this:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '.'.
I'd love to know why it didn't work.
Please elaborate on this.
Thank you.