suppose I have two table one Emp and other is dpt.
Emp table has a field ,dept id,name ,sal and dpt table has a
field dept id,dept name.
Now I want to find out the emplyee list whose sal is between
2000-3000 from dept x.
Answer Posted / sravan
You can also solve it by using sub-query
SELECT DISTINCT NAME FROM EMP E
WHERE SAL>2000 AND SAL<3000
AND E.DEPTID IN (SELECT D.DEPTID FROM DPT D
WHERE DEPTNAME='X');
thanks
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What do you understand by exception handling in pl/sql?
Why are cursors used?
What is a sql instance vs database?
What is the difference between truncate and drop statements?
Explain the methods used to protect source code of pl/sql.
What do you mean by table in sql?
what are the security recommendations while using mysql? : Sql dba
What is a full join?
What does count (*) mean in sql?
What is update query?
define sql update statement ? : Sql dba
Mention what does plv msg allows you to do?
How many triggers can be applied to a table?
How to test for null values?
What is a sql*loader control file?