2024-11-22 18:19:08
2024-11-22 12:53:00
2024-11-22 16:07:23
CREATE OR REPLACE
FUNCTION isPrime(
num IN NUMBER)
RETURN BOOLEAN
IS
BEGIN
IF(num<=1) THEN
RETURN FALSE;
END IF;
FOR i IN 2..(num-1)
LOOP
IF(mod(num,i)=0) THEN
RETURN FALSE;
END IF;
END LOOP;
RETURN TRUE;
END;
/
以前写得函数,过程循环调用一下就行