I explain my problem, I am following a course of C # and SQL Server , but I do not occupy the same database manager but MYSQL in a part of a video explains about user permissions. I show you that part of the code.
DELIMITER
$$
CREATE PROCEDURE sp_get_reglas(_id_reglas INT)
BEGIN
DECLARE
@true BIT -1,
@false BIT -0
SELECT CASE WHEN
rgr.id_regla IS NULL THEN @true ELSE @false AND AS Selectd,
reg.id_regla,
reg.regla
FROM
tb_regla reg
LEFT JOIN tb_reglarol rgr ON
reg.id_regla = rgr.id_regla AND rgr.id_rol = _id_regla
ORDER BY
reg.id_regla ;
END $$
DELIMITER
;
When I execute it, it generates this error:
These are the ways I've tried
'-DECLARE _verdadero BIT DEFAULT 1;-'
'-DECLARE _falso BIT DEFAULT 0;-'
'-DECLARE _verdadero BIT DEFAULT true;-'
'-DECLARE _falso BIT DEFAULT false;-'
'-DECLARE _verdadero BIT DEFAULT 1;-'
'-SET _verdadero = true;-'
'-DECLARE _falso BIT DEFAULT 0;-'
'-SET _falso = false;-'
'-DECLARE _verdadero bit(1);-'
'-SET _verdadero = true;-'
'-DECLARE _falso bit(0);-'
'-SET _falso = false-'
'-DECLARE @verdadero BIT DEFAULT 1,-'
'-DECLARE @falso BIT DEFAULT 0,-'