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 are sql*plus environment variables?

559


Are views faster than queries?

548


What is raid? How does it help storage of databases?

604


What is the reports view in oracle sql developer?

545


What is trigger explain with example?

552






What is audit logout in sql profiler?

592


What does partition by mean in sql?

515


What is the primary use of normalization?

532


What is embedded sql with example?

547


Are stored procedures compiled?

525


explain access control lists. : Sql dba

557


what is meant by urlencode and urldocode? : Sql dba

603


what are dynamic queries in t-sql? : Transact sql

563


Compare sql & pl/sql

612


does sql support programming? : Sql dba

611