LightDB-A 兼容oracle支持mod操作符
LightDB-A 为了兼容oracle,从23.3版本开始支持mod操作符,其语义同 ‘%’ 操作符,使用案例如下:
select 5 mod 2;?column?
----------1
(1 row)select 0 % 0;
ERROR: division by zeroselect 5 % 0;
ERROR: division by zeroselect -1 % 0;
ERROR: division by zeroselect -1 % 2;?column?
-----------1
(1 row)select -1 % 3;?column?
-----------1
(1 row)select -2 % 3;?column?
-----------2
(1 row)do $$
DECLARE
id int;
beginid := 7 mod 4;RAISE NOTICE 'id = %', id;
end;
$$;NOTICE: id = 3
DO