Mysql query:
How to change the query into postgresql?
INSERT into tablename SET a=10, b=20, c=30
PostgreSQL does not support syntax INSERT...SET (mysql does).
But another systax can be something you need:
with full fields:
INSERT into tablename
SELECT 10 AS a, 20 AS b, 30 as c;
with specific fields:
INSERT into tablename (b, c)
SELECT 20 AS b, 30 as c;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With