August 14, 2003 at 8:41 am
LOL!! That was a sneaky question, but good. I have to be honest that although I answered incorrectly, I had a good laugh when I saw the answer!
You got me on that one, but it looks like I wasn't alone.
Thanks for the QOD! I've been learning more about SQL Server from participating in the QOD. For me it's not about the score, but about what I learn. The QOD has had me opening up BOL quite a few times to read more about subject. It's a fun way to learn more about SQL Server. Thank you!
--Dave
August 14, 2003 at 9:26 am
I knew this one looked too easy!
Since I don't like getting it wrong, I opt to change the question to suit my answer - all it takes is brackets around Primary:
CREATE TABLE DEMO
([Primary] int,
Name varchar(30) DEFAULT SYSTEM_USER)
GO
INSERT DEMO ([Primary]) VALUES(1)
SELECT * FROM DEMO
Ahh, that feels better...
Data: Easy to spill, hard to clean up!
August 14, 2003 at 10:11 am
Sneaky. Two reasons why I got it right; 1) I'm a stickler for trying not to use keywords or reserved keywords... 2) I took a little more time to think about the answer because I wasn't sure what the output of SYSTEM_USER would be.
Edit: Just thinking about it now... the question should have stated which client tool bknight was using. It's possible for someone to have a tool that would automatically parse the keyword, adding brackets..
Edited by - spongemagnet on 08/14/2003 10:13:32 AM
-Ken
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply