Mysql查询:
如何将查询更改为postgresql?
INSERT into tablename SET a=10, b=20, c=30
答案 0 :(得分:1)
PostgreSQL不支持INSERT ... SET语法(mysql支持)。
但是您可能需要另一个系统税:
具有完整字段:
INSERT into tablename
SELECT 10 AS a, 20 AS b, 30 as c;
具有特定字段:
INSERT into tablename (b, c)
SELECT 20 AS b, 30 as c;