Comments on: What is a SQL blind insert? http://www.xaprb.com/blog/2006/07/07/what-is-a-sql-blind-insert/ Stay curious! Fri, 10 May 2013 18:25:19 +0000 hourly 1 http://wordpress.org/?v=3.5.1 By: Xaprb http://www.xaprb.com/blog/2006/07/07/what-is-a-sql-blind-insert/#comment-1082 Xaprb Tue, 11 Jul 2006 20:33:28 +0000 http://www.xaprb.com/blog/?p=195#comment-1082 That is true. The last syntax has the limitation of being one row at a time, though. And I’m not sure it is supported on all RDBMSs. I think it was originally an Oracle extension to standard SQL that other vendors now support for compatibility. I’m looking at the draft SQL 2003 document, 5WD-02-Foundation-2003-09.pdf, section 14.8 and it looks like it’s a non-standard syntax. Still, it’s worth knowing about… and as I always say, use it if it makes sense to.

]]>
By: Sheeri http://www.xaprb.com/blog/2006/07/07/what-is-a-sql-blind-insert/#comment-1081 Sheeri Tue, 11 Jul 2006 20:07:26 +0000 http://www.xaprb.com/blog/?p=195#comment-1081 I’ll also note that there are 2 ways to do an insert:

INSERT into apples (field1,field2....) select.....

and

INSERT into apples (field1,field2....) VALUES (....

are similar in syntax, and then there’s

INSERT INTO Image set field1="foo",field2="bar",field3=12345;

Folks may feel more comfortable with the latter syntax, because they don’t have to count which field they’re on.

]]>
By: James at Explode Code http://www.xaprb.com/blog/2006/07/07/what-is-a-sql-blind-insert/#comment-1073 James at Explode Code Mon, 10 Jul 2006 21:28:43 +0000 http://www.xaprb.com/blog/?p=195#comment-1073 Interesting points. I’ve been sort of learning as I’ve gone along and looking at some code I wrote I’ve got a few blind inserts. I can see why it could easily become a problem when you change something in the database if it isn’t specified in the code.

Thanks!

]]>