Subject | select single value in a procedure |
---|---|
Author | gabomgp |
Post date | 2011-02-02T14:23:50Z |
Hello, i need help. I can't find the answer to the question: If I use a select to select a single value from a table and store it to a variable, and there is not a value that meet the condition in the where clause, what happens with the variable?, it's store the null value or it does not change its current value? Example:
SELECT "tieneSerial"
FROM "TipoProductoEstablecer" tp INNER JOIN "CodigoGeneralEstablecer" cg
ON tp."id"=cg."TipoProducto_id"
WHERE cg."id"=New."CodigogGeneral_id"
INTO :tieneSerial;
:tieneSerial (hasSerial) has any value after this? or its current value don't change?
SELECT "tieneSerial"
FROM "TipoProductoEstablecer" tp INNER JOIN "CodigoGeneralEstablecer" cg
ON tp."id"=cg."TipoProducto_id"
WHERE cg."id"=New."CodigogGeneral_id"
INTO :tieneSerial;
:tieneSerial (hasSerial) has any value after this? or its current value don't change?