Hi All,
Hope all are doing good.
I need your help in writing a SQL query, my requirement is to fetch all the records of a table when a null value is given to its parameter (&empno) and fetch the specific record when a specific value is given to the same parameter(&empno).
eg:- select * from emp where emp='&empno'; ---if value of &empno is null fetch all the records of the table.
eg:- select * from emp where emp='&empno'; ---if value of &empno is '1234' query should fetch the record of empno '1234' the table.
Thanks in advance.
Regards.