El error dice:
Código MySQL:
Ver originalyou have an error
in your SQL sintax
; check de manual that corresponds
to your
num=(select total from factura where cod_factura=4); select num; end;' at line 3
y cuando lo hago de forma diferente:
Código MySQL:
Ver originaldelimiter //
param=0;
//
delimiter ;
you have an error
in your SQL sintax
; check de manual that corresponds
to your
mysql server
version for de rigth sintax
to use near
'param=0;param=(select total from factura where cod_factura=4); select param; end;' at line 3
ò
Código MySQL:
Ver originaldelimiter //
//
you have an error
in your SQL sintax
; check de manual that corresponds
to your
mysql server
version for de rigth sintax
to use near
'@var=0;@var=(select total from factura where cod_factura=param); select param; end;' at line 3
delimiter ;