Subject | Re: [Firebird-Java] insert multiple rows |
---|---|
Author | Roman Rokytskyy |
Post date | 2007-12-12T08:37:28Z |
Sorry for late reply...
EXECUTE BLOCK AS BEGIN
INSERT INTO tbl_x(col1, col2, col3) VALUES(' val11 ', ' val1'2, val13);
INSERT INTO tbl_x(col1, col2, col3) VALUES(' val11 ', ' val1'2, val13);
/* ...and so on */
END
Note, the size of the SQL statement is limited by 64k or 32k in compiled
form (the smaller applies).
Roman
> Does somebody know as inserting multiple registrations in firebird?Firebird does not support such syntax. The closest solution is:
> and attempted the following thing but it generates me error:
> INSERT INTO tbl_x (col1, col2, col3)
> VALUE ((' val11 ', ' val1'2, val13),
> (' val11 ', ' val1'2, val13),
> (' val11 ', ' val1'2, val13));
EXECUTE BLOCK AS BEGIN
INSERT INTO tbl_x(col1, col2, col3) VALUES(' val11 ', ' val1'2, val13);
INSERT INTO tbl_x(col1, col2, col3) VALUES(' val11 ', ' val1'2, val13);
/* ...and so on */
END
Note, the size of the SQL statement is limited by 64k or 32k in compiled
form (the smaller applies).
Roman