Oracle related to count(*) syntax alternate options i am using a Stored Procedure which are using multiple count(*) in oracle which makes slowness of the server the same i have used in db2 using if exists() which works fine in db2 but the same syntax is not supporting in oracle. 
below is my Stored Procedure: i have to use 8 elsif conditions(just use here 2 only)

in the below SP i don't want to use count(*). can anyone help on this:

CREATE OR REPLACE FUNCTION GetStandadrdDefaultDataXml
(
    p_pf_wkstn_oid_sh number,   
    p_pf_wkstn_oid_lng number   
)
RETURN varchar2
IS
 StdDefaultValue varchar2(1500);
 rate_count1L NUMBER(5);
 rate_count1 NUMBER(5);
 v_count NUMBER(5);
BEGIN 

    --RateTable1L
    select count(*) into rate_count1L FROM RateTable1L where wkstn_oid_sh = p_pf_wkstn_oid_sh 
            AND wkstn_oid_lng = p_pf_wkstn_oid_lng and exact='STANDARD DEFAULT';
    --RateTable1
    select count(*) into rate_count1  FROM RateTable1 where wkstn_oid_sh = p_pf_wkstn_oid_sh 
            AND wkstn_oid_lng = p_pf_wkstn_oid_lng and exact='STANDARD DEFAULT';


    --RateTable1 and RateTable1L
    IF( rate_count1L &gt; 0 ) 
    THEN
        --RateTable1L
        SELECT rate into StdDefaultValue FROM RateTable1L where wkstn_oid_sh = p_pf_wkstn_oid_sh AND wkstn_oid_lng = p_pf_wkstn_oid_lng  and exact ='STANDARD DEFAULT';
    ELSIF ( rate_count1 &gt; 0 )
    THEN
        --RateTable1
        SELECT rate into StdDefaultValue FROM RateTable1 where wkstn_oid_sh = p_pf_wkstn_oid_sh AND wkstn_oid_lng = p_pf_wkstn_oid_lng  and exact ='STANDARD DEFAULT';
    --RateTable2 and RateTable2L
    --- multiple elsif we have to use here.
        END IF;

    return StdDefaultValue;
END;
/


Please provide solution/hints to handle
One option would be to try the first query and catch the no_data_found exception

begin
  SELECT rate 
    into StdDefaultValue 
    FROM RateTable1L 
   where wkstn_oid_sh = p_pf_wkstn_oid_sh 
     AND wkstn_oid_lng = p_pf_wkstn_oid_lng  
     and exact ='STANDARD DEFAULT';
exception
  when no_data_found
  then
    SELECT rate 
      into StdDefaultValue 
      FROM RateTable1 
     where wkstn_oid_sh = p_pf_wkstn_oid_sh 
       AND wkstn_oid_lng = p_pf_wkstn_oid_lng  
       and exact ='STANDARD DEFAULT';
end;


or iterate through the tables

begin
  SELECT rate 
    into StdDefaultValue 
    FROM RateTable1L 
   where wkstn_oid_sh = p_pf_wkstn_oid_sh 
     AND wkstn_oid_lng = p_pf_wkstn_oid_lng  
     and exact ='STANDARD DEFAULT';
exception
  when no_data_found
  then
    StdDefaultValue := null;
end;

if( StdDefaultValue is null )
then
  begin
    SELECT rate 
      into StdDefaultValue 
      FROM RateTable1
     where wkstn_oid_sh = p_pf_wkstn_oid_sh 
       AND wkstn_oid_lng = p_pf_wkstn_oid_lng  
       and exact ='STANDARD DEFAULT';
  exception
    when no_data_found
    then
      StdDefaultValue := null;
  end;
end if;


If it is more likely that the value will be found in one of the tables, it would make sense to check that table first.  Depending on how many tables you have to check and how many times this is getting called, exception handling may not be the most efficient approach.  You might be better off with a single UNION ALL query assuming that the value will appear in at most one table.

  SELECT rate 
    into StdDefaultValue 
    FROM (SELECT rate 
            FROM RateTable1L 
           where wkstn_oid_sh = p_pf_wkstn_oid_sh 
             AND wkstn_oid_lng = p_pf_wkstn_oid_lng  
             and exact ='STANDARD DEFAULT'
          UNION ALL
          SELECT rate 
            FROM RateTable1
           where wkstn_oid_sh = p_pf_wkstn_oid_sh 
             AND wkstn_oid_lng = p_pf_wkstn_oid_lng  
             and exact ='STANDARD DEFAULT')


From a data model standpoint, though, having 8 separate tables with the same basic structure and not knowing which table you need to query seems problematic.  It would seem like the sort of thing that is either calling for a parent entity with a type attribute that stores data common to all 8 tables or for creating a single table with 8 partitions. Either approach would make writing code far easier and would make the code more efficient.