“polardb中PG能支持delete limit语法吗?像 delete from tbl where xxx limit 100;
“
以下为热心网友提供的参考意见
“
https://github.com/digoal/blog/blob/master/201608/20160827_01.md
https://github.com/digoal/blog/blob/master/202110/20211002_03.md
此答案整理至钉群“PG|POLARDB技术进阶”。”
以下为热心网友提供的参考意见
可以支持,不过与原生MySQL的DELETE语法相比,PolarDB-X的DELETE语法存在以下限制。
默认禁止删除行数超过10000的不可下推的DELETE,需要通过HINT打开限制,例如:
DELETE FROM t1 ORDER BY name LIMIT 10001;
DELETE t1, t2 FROM t1 INNER JOIN t2 INNER JOIN t3 WHERE t1.id=t2.id AND t2.id=t3.name LIMIT 10001;
DELETE FROM t1, t2 USING t1 INNER JOIN t2 INNER JOIN t3 WHERE t1.id=t2.id AND t2.id=t3.name LIMIT 10001;
——参考来源于阿里云官方文档。
本文来自投稿,不代表新手站长_郑州云淘科技有限公司立场,如若转载,请注明出处:https://www.cnzhanzhang.com/10979.html