OMG! What am I doing wrong?
declare @WTF TABLE ( OrderItemId int ) SELECT TOP 20 OrderItemId as OrderItemId INTO [@WTF] FROM ac_OrderItems SELECT * FROM [@WTF]
Problem A. This creates a PHYSICAL table called @WTF. WHAT FOR?? I thought it was only in my memory ?!
Problem B : last line of code, if I select * from @WTF ... WITHOUT [], it returns NOTHING. What is the meaning of []?
I need some serious help. I'm losing my mind!
Thanks in advance.
source share