In MySQL, I can insert multiple rows of data with one insert statement by simply comma separating the VALUES part of the statement. How can I batch/bulk/multiple row insert into HANA with one INSERT statement?
Request clarification before answering.
Hi Kevin,
I don't think currently this feature is available in HANA, but you can use INSERT INTO .. SELECT statement for multiple rows insert.
May be as a work around you can use something like:
INSERT INTO ..
(SELECT ... from dummy
UNION
SELECT... from dummy
UNION
SELECT... from dummy
)
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Richard,
the INSERT INTO (SELECT... ) approach always worked.
What's not possible with SAP HANA is something like this:
insert into users (user_name, user_id) values (('LARS', 1), ('PETER', 2));
Such multi-inserts are not supported by SAP HANA.
In case you do have a working example where this actually works, please share
- Lars
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.