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

select e.department_id,e.last_name,e.salary,d.department_name from employees e,
departments d 
where e.department_id=d.department_id and 
e.salary between 2000 and 10000 
and lower(d.department_name)='finance'
/
Out put
DEPARTMENT_ID LAST_NAME                     SALARY DEPARTMENT_NAME
------------- ------------------------- ---------- --------------------
          100 Faviet                          9000 Finance
          100 Chen                            8200 Finance
          100 Sciarra                         7700 Finance
          100 Urman                           7800 Finance

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql and also describe types of sql statements?

642


What is the least restrictive isolation level? : Transact sql

662


How to select random rows from a table?

628


Which sorts rows in sql?

679


Why are cursors used?

680






How can you know that statistics should be updated?

720


What is offset and limit in sql?

645


When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?

739


What is native sql query?

650


Is join an inner join?

634


Why procedure is used in sql?

643


what is a table in a database ? : Sql dba

648


What is the difference between nested table and varray?

600


What does the base_object_type column shows in the user.triggers data dictionary view?

660


What is the sql*loader? : aql loader

671