today:
1,709
yesterday:
1,444
Total:
386,371

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 Views Date
32 PHOTO SIZE 줄이기 admin 5 2025.11.23
31 ATACCESS admin 4 2024.03.02
30 꿈 - 08/26/2018 admin 6 2018.08.26
29 Medwigs admin 4 2018.07.17
28 TABLE PRINT admin 4 2018.06.18
27 FOOTER admin 4 2018.06.16
26 SQL CODE (1) admin 1 2018.06.16
25 GP PRINT admin 4 2018.05.31
24 How to convert DATE to NUMBER admin 1 2018.05.27
23 DATE Compare admin 1 2018.05.22
22 If you want to use EXISTS in a PL/SQL function returning BOOLEAN admin 2 2018.05.19
» use a validation function for an element in apex 5.0 admin 4 2018.05.19
20 Validation to detect text in numeric field admin 1 2018.05.19
19 All Data DELETE from Table admin 7 2018.05.10
18 Process admin 8 2018.05.05
17 소식 궁금 합니다. 감사또감사 4 2018.05.21
16 HTTP ERROR 500 admin 2 2018.05.14
15 05/10/2018 - SET UP admin 1 2018.05.10
14 05/04/2018 admin 2 2018.05.04
13 05/04/2018 admin 4 2018.05.04