![]() Related Questions Can we use aggregate function in another aggregate functionsuppose we got count of a column by using Can we use aggregate function in another aggregate functionsuppose we got count of a column by using the group by clause so we get different counts in the same statement how to get the maximum of count Read Answers (11) | Asked by : sahithi In SQL. (DB2)there is one Dept table and other Emp tableQuestion- select Emp Name from Emp whose Dept No. is not in Dept table and it is present in Emp table Plz tell the Query? Read Answers (8) | Asked by : dinesh How can i display a column name with a '-' sign. i.e by using concat sttle i can concat two column name but is there a possiblity to display column name as "EMPLOYEE -- ID" Latest Answer : Use the below query, this works fine to find the 4th and 5th maximum salary of an emp table. You can change the numbers in where condition to get the nth maximum.SELECT a.*, b.rn
FROM emp a, (SELECT emp_id, rownum rn FROM emp ORDER BY salary ... Read Answers (15) | Asked by : ramaprasad Hey there SQL MASTERS, here are some questions i was posed in an interview/assessment thing, dunno how well i did....Coud u answer these questions? i dont know how easy/difficut they are for u, all i know is that i had SERIOUS trouble with them! thanks alot!EMPLOYEEEmployee_id number NOT NULL (Primary Key)Employee_name VarChar(30) NOT NULL Dept_id number NOT NULL (Foreign Key to DEPARTMENT)Manager_id number NOT NULL (Foreign Key to EMPLOYMENT)Salary number Read Answers (7) | Asked by : zen Latest Answer : In Trigger there is a special Table Called INSERTD. it takes the value from transation log.In the After Insert Trigger....SELECT Id,Name FROM INSERTEDyou can catch these values in a variable. ... Read Answers (4) | Asked by : Mahendra raja Latest Answer : Basically deleting duplicate records while creating table sounds inefficiency of the SQL DBA.To avoid duplication one can provide the column datatype as Unique or Primary key.........Which is the best method upto my knowledge to prevent duplication entry ... Read Answers (15) | Asked by : Anita Latest Answer : SELECT * FROM(SELECT * FROM employees ORDER BY rownum DESC)WHERE rownum < 2 ... Read Answers (19) | Asked by : A Latest Answer : select * from (select * from(select * from emp order by sal desc) where rownum ... Read Answers (43) | Asked by : suman 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?
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||