在Oracle中,INSERT语句有以下几种写法:
INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...);
INSERT INTO table_name (column1, column2, column3, ...)
SELECT column1, column2, column3, ...
FROM source_table
WHERE condition;
INSERT INTO table_name (column1, column2, column3, ...)
VALUES (SELECT column1, column2, column3, ... FROM source_table WHERE condition);
INSERT ALL
INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...)
INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...)
INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...)
SELECT * FROM dual;
INSERT INTO table_name (column1, column2, column3, ...)
SELECT column1, column2, column3, ...
FROM source_table
WHERE condition AND ROWNUM <= 10;
请根据具体的需求选择适合的INSERT语句写法。