1
I need to make a WHILE
in SQL. Follow the code I’ve tried
DECLARE CONT INT;
SET CONT=0;
WHILE CONT < 3
BEGIN
SELECT CONT
SET CONT = CONT +1;
END;
The error that arises is as follows:
Erro a partir da linha : 1 no comando - DECLARE CONT INT; SET CONT=0; WHILE CONT < 3 BEGIN SELECT CONT SET CONT = CONT +1; END; Relatório de erros - ORA-06550: linha 2, coluna 9: PLS-00103: Encontrado o símbolo "=" quando um dos seguintes símbolos era esperado: := . ( @ % ; not nulo faixa default caractere 06550. 00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. *Action:
The question is about PL/SQL and Oracle, not Mysql.
– Thiago Lunardi