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 is server name sql?
What is the usage of sql functions?
Explain the rollback statement?
Why is a trigger used?
what is dbms? : Sql dba
Why we use join in sql?
Can we commit in trigger?
What is procedure in pl sql?
What is synchronized subquery?
Why do we need view in sql?
how to get a list of columns in an existing table? : Sql dba
What is nested table in pl sql?
what are the different type of normalization? : Sql dba
What is a ddl command?
What is exception? What are the types of exceptions?