What is the SQL statement to insert multiple rows in to database table?
INSERT INTO members (name, age, ID) VALUES ('aron',33,1000);
INSERT INTO members (name, age, ID) VALUES ('ben',48,1000);
INSERT INTO members (name, age, ID) VALUES ('carl',20,1000);
How can I combine into single statement?
There is no standard query that works on all databases.
In MySQL and SQL Server,
INSERT INTO members (name, age, ID) VALUES ('aron',33,1000), ('ben',48,1000), ('carl',20,1000);
In Oracle,
INSERT ALL
INTO members (name, age, ID) VALUES ('aron',33,1000)
INTO members (name, age, ID) VALUES ('ben',48,1000)
INTO members (name, age, ID) VALUES ('carl',20,1000)
SELECT 1 FROM DUAL;