I am failing to consult within a Stored Procedure

0

I make a query, to know the Id of a specific table whose value I keep in a variable, this always gives me zero and is incorrect, since that value is in that table.

set @provi = (select Id From Provincia  Where Nombre = _provincia); 
    
asked by Diogenes Monegro 16.07.2018 в 19:06
source

1 answer

0

Try it like this:

Select Id Into @provi From Provincia  Where Nombre = _provincia;
    
answered by 16.07.2018 в 19:12