Using below sql query we can find highest and second highest column value of table.
1- Highest
SELECT sal FROM emp e WHERE 1=(SELECT count(*) FROM emp WHERE e.sal <= sal)
2- Second Highest
SELECT sal FROM emp e WHERE 1=(SELECT count(*) FROM emp WHERE e.sal < sal)
Hi Arvind
ReplyDeleteIt's very nice to see u r blog, we can use for like discussion forum.Can we create group and any one had question then he post his question on blog and any one who knows better answer of this question then he posted his answer.
let me know whether it is possible.
ReplyDelete