You are viewing a single comment's thread. Return to all comments →
DELIMITER ## CREATE PROCEDURE PRIME(IN P INT) BEGIN DECLARE I INT DEFAULT 2; O: WHILE I<=P DO DECLARE J INT ; DECLARE T INT; SET J = 2; INN: WHILE J <= SQRT(I) DO IF MOD(I, J) = 0 THEN SET T = 0; LEAVE INN; END IF; SET T = 1; SET J = J +1; END WHILE INN; IF T = 1 THEN SELECT I ; END IF; SET I = I+1; END WHILE O; END## DELIMITER ; CALL PRIME(1000);
this is not working, why? it is giving me an error of wrong syntax
Seems like cookies are disabled on this browser, please enable them to open this website
Print Prime Numbers
You are viewing a single comment's thread. Return to all comments →
this is not working, why? it is giving me an error of wrong syntax