Can I use insert all only in different tables?

Asked 2 years ago, Updated 2 years ago, 54 views

I'm trying to use insert all.

insert all

insert ANIMAL values('dog', 'a001', 'Y')

insert ANIMAL values('dog', 'a002', 'Y')

select 1 from dual;

No, more than one update cursor can be used on a table.

Is it only available once per table?

database

2022-09-22 21:42

1 Answers

Are you using Oracle DB?

INSERT ALL
  INTO Animal (column1, column2, column_n) VALUES ('dog', 'a001', 'Y')
  INTO Animal (column1, column2, column_n) VALUES ('dog', 'a002', 'Y')
SELECT * FROM dual;

Change the insert to int and try it.


2022-09-22 21:42

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.