You could do a count(*)
instead
declare
l_cnt integer;
begin
select count(*)
into l_cnt
from items
where id_referencia = :P2_REFERENCIA;
if( l_cnt >= 1 )
then
return true;
else
return false;
end if;
end;
If you really wanted to do an exists
, you'd do something like this. I don't know why you'd want to do this assuming that id_referencia
is the primary key of the table. But you could
declare
l_exists integer;
begin
begin
select 1
into l_exists
from dual
where exists( select 1
from items
where id_referencia = :P2_REFERENCIA );
exception
when no_data_found
then
l_exists := 0;
end;
if( l_exists = 1 )
then
return true;
else
return false;
end if;
end;
No. | Subject | Author | Date | Views |
---|---|---|---|---|
86 | LIST OF VALUE (DYNAMIC) | admin | 2016.04.28 | 139 |
85 | HEAD TITLE (제목)을 조건에 따라 바꾸기 | admin | 2016.05.03 | 141 |
84 | Delimiter | admin | 2016.04.29 | 144 |
83 | APEX Connect 2016 - David Peake - New Features in Oracle Application Express 5.1 | admin | 2017.11.25 | 145 |
82 | Oracle APEX 5.1.4 Installation | admin | 2018.04.17 | 148 |
81 | Null Display Value | admin | 2024.01.10 | 149 |
80 | How to Update Oracle XE | admin | 2018.04.25 | 151 |
79 | LAST DAY SQL | admin | 2024.01.19 | 151 |
78 | BOOLEAN SAMPLE | admin | 2016.05.11 | 152 |
77 | Outer Join with Oracle SQL | admin | 2016.04.29 | 154 |
76 | Field Showing | admin | 2016.04.01 | 157 |
75 | Forgot Oracle username and password, how to retrieve? | admin | 2022.03.18 | 157 |
74 | CREATE (INSERT) PROCESS | admin | 2016.04.28 | 158 |
73 | COUNT | admin | 2016.04.28 | 158 |
72 | wwv_flow_files | admin | 2016.05.01 | 159 |
71 | NVL | admin | 2016.05.19 | 159 |
70 | PHONE NUMBER | admin | 2016.04.28 | 162 |
69 | SQL Developer Password change / EXPORT & IMPORT | admin | 2022.03.18 | 163 |
68 | MAX | admin | 2016.04.28 | 164 |
67 | INSERT PROCESS | admin | 2016.04.28 | 166 |