Oracle does not support this syntax, but you can use multiple separate INSERT statements, single INSERT statement with SELECT UNION ALL, or single INSERT ALL statement. INSERT INTO users ON CONFLICT (id) DO UPDATE SET nameexcluded. Is it possible to insert multiple rows into Postgres database at once Could someone please suggest if there is a way to insert a slice of slices into database. But now my use case is, I have to insert multiple rows into the feedback table. With this command you can insert multiple rows/records direct from SQL query and also you can. You can insert multiple rows in a table in PostgreSQL using SELECT query also. You can INSERT multiple rows in SQL via using INSERT INTO command. If user doesn't exists it inserts data in users table and returns id which is used for inserting data to feedbacks table. PostgreSQL INSERT Multiple Rows from SELECT query. Insert multiple rows with single statement INSERT INTO cities (name, state ) VALUES ( 'San Francisco', 'CA' ), ( 'New York', 'NY' ), ( 'Los Angeles', 'CA' ) // pass a slice to insert multiple row result.Error // returns error result. Above works well when we insert a new row to feedbacks table.
In MySQL, you can insert multiple rows using a single INSERT statement: