You are on page 1of 1

1. Delete duplicate record from table.

delete from emp where rowid not in (select min(rowid) from emp group by
id);
2. Where null values will appears in a sorted column?
in ascending it appears in last.
3. Print `no value` instead of null in commission column.
select nvl(to_char(commission), 'no value') from emp;
4. Print top 3 Earners.
select rownum, id, sal from (select id, sal from emp order by sal desc)
where rownum<=3;

You might also like