May 13, 2009 at 4:10 pm
A co-worker just asked me a question, that got my head scratching. How do you insert a row in a table, where every column has a default value. He doesn't want to supply any data, just insert a row and let the defaults take over.
Can something like this be done? What's the syntax?
TIA
Andre
May 13, 2009 at 4:25 pm
--
INSERT INTO T1 DEFAULT VALUES;
--
This is right out of the examples in Books Online for the INSERT statement. Sometimes it's as easy to RTFM as it is to ask a forum. 😉
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
May 13, 2009 at 4:27 pm
You got me there. My bad.
May 14, 2009 at 12:50 pm
No problem. Hope you didn't mind me poking a little fun.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply