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
Are pl sql variables case sensitive?
what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba
How do I create a sql script?
what is not null constraint? : Sql dba
how to rename an existing column in a table? : Sql dba
How to add new employee details in an employee_details table with the following details
Explain the uses of database trigger.
Explain what is a field in a database and record in a database?
What is difference between rank () row_number () and dense_rank () in sql?
What is PL/SQL Records?
What is crud stand for?
What are the conditions an underlying table must satisfy before a cursor can be used by a positioned update or delete statement? : Transact sql
What is posting?
What are the types of operators available in sql?
how to present a past time in hours, minutes and seconds? : Sql dba