![]() 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 Latest Answer : We cannot use a commit statement in a trigger. Trigger has auto commit. ... Read Answers (18) | Asked by : suresh 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 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 Select 1 from dualunionselect 'A' from dual; I guess the query will select zero rows. Is it wrong or right ? if wrong thenWhat will be the result set for the query?Thanks in advance. Read Answers (4) | Asked by : Rachana 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
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||