Closed GoogleCodeExporter closed 9 years ago
Insert multiple rows:
http://docs.oracle.com/javadb/10.4.2.1/devguide/cdevtricks807337.html
Derby supports the complete SQL-92 VALUES clause; this is very handy in several
cases.
The first useful case is that it can be used to insert multiple rows:
INSERT INTO OneColumnTable VALUES 1,2,3,4,5,6,7,8
INSERT INTO TwoColumnTable VALUES
(1, 'first row'),
(2, 'second row'),
(3, 'third row')
Dynamic parameters reduce the number of times execute requests are sent across:
ij> -- send 5 rows at a time:
ij> PREPARE p1 AS 'INSERT INTO ThreeColumnTable VALUES
(?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?)';
ij> EXECUTE p1 USING 'VALUES (''1st'',1,1,''2nd'',2,2,''3rd'',
3,3,''4th'',4,4,''5th'',5,5)';
Original comment by moa...@gmail.com
on 24 Jan 2013 at 1:10
Original comment by moa...@gmail.com
on 25 Jan 2013 at 10:30
Original comment by moa...@gmail.com
on 31 Jan 2013 at 11:22
Original issue reported on code.google.com by
moa...@gmail.com
on 24 Jan 2013 at 11:33