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 / manasa

SELECT e.name,d.dept from employee e INNERJOIN dept d ON e.deptid=d.deptid WHERE e.salary between 2000 AND 3000

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the need of merge statement?

554


What is sql not null constraint?

605


how can you see all indexes defined for a table? : Sql dba

537


What is an intersect?

655


what is a trigger? : Sql dba

577






discuss about myisam key cache. : Sql dba

563


What are the different sql languages?

540


What is primary key and foreign key?

534


Which is faster truncate or drop?

560


how can we submit a form without a submit button? : Sql dba

538


Write a unique difference between a function and a stored procedure.

533


explain the advantages and disadvantages of stored procedure? : Sql dba

533


how many values can the set function of mysql take? : Sql dba

532


Can we use the cursor's to create the collection in PL/SQL?

522


What is difference between group by and partition by?

499