Oracle: List the name, salary of all the employees where employee first name belongs in a specified list
Oracle Operator: Exercise-9 with Solution
Write a query to list the name, salary of all the employees where employee first name belongs in a specified list.
Sample table : employees
Sample Solution :-
Oracle Code :
SELECT first_name, salary
FROM employees
WHERE first_name IN ('Peter', 'Smith');
Output:
FIRST_NAME SALARY -------------------- ---------- Peter 2500 Peter 10000 Peter 9000
Pictorial Presentation:
Improve this sample solution and post your code through Disqus.
Previous: Write a query to list the names, salary of all the employees who are working with a commission package.
Next: Write a query to list the first name, last name, Job id of all the employees except "IT_PROG " & " FI_ACCOUNT" in asc order of Salaries.
What is the difficulty level of this exercise?
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework