I have a query and I want to use if statement inside where clause like this : [code] SELECT e.first_name, e.last_name, e.status FROM employees e WHERE IF status_flag = STATUS_ACTIVE then e.status = 'A' IF status_flag = STATUS_INACTIVE then e.status = 'T' IF source_flag = SOURCE_FUNCTION then e.business_unit = ...
Home/if statement
Oraask Latest Questions
Question
Question
hello can I use select inside if statement like : begin if (select count(*) from employees) >= 15 then do something; end if; end; note : I want to delete rows from table where above condition evaluates with true