SELECT supermag.smcardproperties.PROPVAL,
supermag.smcardproperties.*
FROM supermag.smcardproperties
WHERE supermag.smcardproperties.ARTICLE = '002229'
AND supermag.smcardproperties.PROPID = '11'
FUNCTION FUNCTION1 RETURN VARCHAR2 IS
res supermag.smcardproperties.propval%TYPE;
BEGIN
SELECT PROPVAL into res
FROM supermag.smcardproperties
where article = '002229'
and propid = '11';
return res;
END;
SQL> SELECT PROPVAL FROM supermag.smcardproperties where article = '002229' and propid = '11';
PROPVAL
------------------------------------------------------------------------------------------------
ИП "Пупкин"
SQL>
SQL> DECLARE
2 res supermag.smcardproperties.propval%TYPE;
3 BEGIN
4 SELECT PROPVAL into res FROM supermag.smcardproperties where article = '002229' and propid = '1
1';
5 dbms_output.put_line(res);
6 END;
7 /
ИП "Пупкин"
PL/SQL procedure successfully completed.
SQL>