December 18, 2008 at 7:58 am
One dev just asked me
"If you have a table with an autogen id column, and a datetime column which defaults to now() (dev speak for CURRENT_TIMESTAMP π ) can you just insert rows without adding anything else?"
Hmmm I thought sounds bizzare insert a row without adding any other data................:crazy:
I don't think it would work.... how do you do the insert?
You have to add something to the row to get it to generate an instance of a row and bind it to the table. i.e. a data item into a third column.
(Time to educate with extreme predjudice) π
--Shaun
Hiding under a desk from SSIS Implemenation Work :crazy:
December 18, 2008 at 8:02 am
Hi Shaun
Wasn't this a qotd earlier in the year?
INSERT INTO table Default Values
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 18, 2008 at 8:10 am
Can't say I saw that one Chris, but I'll go check it out cheers.
So it is possible :crazy: using
INSERT INTO 'tablename' Default Values
Amazing π Them devs are not so dumb afterall. π
--Shaun
Hiding under a desk from SSIS Implemenation Work :crazy:
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply