|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, September 09, 2009 9:06 AM
Points: 5,
Visits: 31
|
|
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
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 3:05 PM
Points: 3,789,
Visits: 5,547
|
|
-- 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? -- Stephen Stills
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, September 09, 2009 9:06 AM
Points: 5,
Visits: 31
|
|
| You got me there. My bad.
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 3:05 PM
Points: 3,789,
Visits: 5,547
|
|
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? -- Stephen Stills
|
|
|
|