GeekInterview.com
Answered Questions

Syntax for getting the table witout any contents

Asked By: deeptipreeti | Asked On: Mar 29th, 2006

Answered by: sampra on: Mar 6th, 2012

create table emp as select * from student where 1=2;

Answered by: Satish Kopalle on: Jun 7th, 2011

select * from faculty where rownum=0;

How to get fifth maximum salary from the table with out using top keywork(without any keywords) in SQL server 2000can you please guide me about this?

Asked By: satchin | Asked On: Mar 20th, 2006

Answered by: monika1985 on: May 28th, 2008

select sal from emp e
where 4=(select count(distinct(sal) from emp where sal>e.sal)

Answered by: Imran_Javed on: May 9th, 2008

SELECT *
FROM  (SELECT  ename ,sal,
                  dense_rank() over (ORDER BY sal DESC) max_sal
        FROM emp)
WHERE max_sal= 5;

Interview Question

 Ask Interview Question?

 

Career Counselling

 Have Career Question?

 Ask Chandra

 Ask Only Career questions.

Follow us: