Well, you don;t say anything about your table or the search criteria you have, so I will give a general example.
- Code: Select all
CREATE OR REPLACE FUNCITON rec_check (p_id IN my_table.id%TYPE)
WHERE id = p_id;
WHEN NO_DATA_FOUND THEN
The function accepts a parameter indicating the ID of the row you are searching for. The query pulls back that row. If it finds it, it returns TRUE. If the row is not found a NO_DATA_FOUND exception is triggered, which is caught and returns FALSE.
If you want anything more specific, send the CREATE TABLE and INSERT statements to build a test case and be more specific about your requirements.