oracle 随机函数
oracle 随机函数
dbms_random.value(0,18)
loop循环
DECLARE p NUMBER := 0; BEGIN FOR k IN 1..500 LOOP -- calculate pi with 500 terms p := p + ( ( (-1) ** (k + 1) ) / ((2 * k) - 1) ); //其中必须要有循环体 END LOOP; p := 4 * p; DBMS_OUTPUT.PUT_LINE( 'pi is approximately : ' || p ); -- print result END;