@mac
To insert 2 queries with sequence in Oracle, you can use the following steps:
1
|
CREATE SEQUENCE seq_name START WITH 1 INCREMENT BY 1; |
1 2 |
INSERT INTO table_name (column1, column2) VALUES (NEXTVAL('seq_name'), 'data1'); INSERT INTO table_name (column1, column2) VALUES (NEXTVAL('seq_name'), 'data2'); |
Replace table_name
with the name of your table, column1
and column2
with the respective column names, and data1
and data2
with the data you want to insert.
By using the NEXTVAL
function with the sequence, you can ensure that each row inserted will have a unique sequential number assigned to it.