DO $FN$
BEGIN
FOR counter IN 279657450..315422529 LOOP
RAISE NOTICE 'Counter: %', counter;
EXECUTE $$ delete from xxxx_table where id=$1 $$
USING counter;
END LOOP;
END;
$FN$
DO $FN$
BEGIN
FOR counter IN 279657450..315422529 LOOP
RAISE NOTICE 'Counter: %', counter;
EXECUTE $$ delete from xxxx_table where id=$1 $$
USING counter;
END LOOP;
END;
$FN$
本文标题:postgres循环操作语句备忘
本文链接:https://www.haomeiwen.com/subject/tpbxsdtx.html
网友评论