1
To procedure
must insert a client with at least 10 characters in name, Uf(Federative unit) with 2 characters and monthly reindeer with more than 500.00.
Follow the query:
DELIMITER $$
CREATE PROCEDURE sp_incluir_cliente(in xnome varchar(45), in
xrenda_mensal decimal(10,2),in xuf varchar(2));
BEGIN
IF (len(xnome))>=10 THEN
IF xrenda_mensal>=500.00 THEN
IF (len(xuf)>=2 THEN
insert into cliente(nome,renda_mensal,uf)
VALUES(xnome,xrenda_mensal,xuf);
END IF;
END IF;
END IF;
END $$
Follows the response of phpmyadmin with reference to my mistakes:
#1064 - Você tem um erro de sintaxe no seu SQL próximo a ';
BEGIN
IF (len(xnome))>=10 THEN
IF xrenda_mensal>=500.00 THEN
' na linha 1
BS: I believe it’s something in IF
however as I did not know how to solve I may be wrong.
Not that the rpoblema no, put with the ';' and did not solve.
– Gabriel Silva
in question is with ';'
CREATE PROCEDURE sp_incluir_cliente(in xnome varchar(45), in 
xrenda_mensal decimal(10,2),in xuf varchar(2));
– Augusto Vasques
@Gabrielsilva: I don’t know if you understand, but it’s without the point and comma
– Augusto Vasques