today:
26
yesterday:
242
Total:
1,004,184

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
66 Delete Message - Are you sure you want to delete this object? admin 2016.04.28 166
65 JAVA for delete admin 2016.04.28 162
64 SQL SELECT DISTINCT Statement admin 2016.04.29 161
63 INSERT PROCESS admin 2016.04.28 160
62 Using SQL*Plus to Unlock and Change Passwords admin 2023.06.04 159
61 DELETE PROCESS admin 2016.04.28 158
60 SQL Developer Password change / EXPORT & IMPORT admin 2022.03.18 157
59 wwv_flow_files admin 2016.05.01 155
58 MAX admin 2016.04.28 155
57 PHONE NUMBER admin 2016.04.28 153
56 Forgot Oracle username and password, how to retrieve? admin 2022.03.18 152
55 NVL admin 2016.05.19 152
54 CREATE (INSERT) PROCESS admin 2016.04.28 151
53 Field Showing admin 2016.04.01 149
52 Outer Join with Oracle SQL admin 2016.04.29 148
51 BOOLEAN SAMPLE admin 2016.05.11 147
50 COUNT admin 2016.04.28 146
49 Delimiter admin 2016.04.29 141
48 Column Data 일괄 추가 admin 2023.11.24 140
47 How to Update Oracle XE admin 2018.04.25 139