1
Would like to nay update the values sent as empty, as the second argument passed from example below, but I want to avoid using an IF, I do not know if mysql provides some function that can help me
Call from the example proc:
call AtualizarCadastro('Valor1', '', 'DoutorPinpolho', 4)
Proc created below:
CREATE PROCEDURE `AtualizarCadastro`(in nome varchar(100), in sobrenome varchar(100), in senha varchar(100), in id int)
BEGIN
UPDATE UsuariosLogin SET
`Nome` nome
`Sobrenome` = sobrenome
`Senha` = senha
where IdUsuario = id;
END
generally this validation is not done in the bank but in its back-end, before the call of the past
– William
Yes, but I do not want to do this validation, and as the database has its own language I believe it can do this natively, since it is a more specific data processing for the database
– MegaMente