w3resource
SQL exercises

SQL Subquery Exercises: Display all the details of employees who works in department 89 or 63

SQL SUBQUERY: Exercise-35 with Solution

35. Write a query in SQL to display all the details of employees who works in department 89 or 63.

Sample table: emp_department


Sample table: emp_details


Sample Solution:

SELECT * 
  FROM emp_details
  WHERE emp_dept IN (89,63);

Output :

SQL Subqueries : Display all the details of employees who works in department 89 or 63

Practice Online


Sample Database:

Model Database

Query Visualization:

Duration:

Query visualization of Display all the details of employees who works in department 89 or 63 - Duration

Rows:

Query visualization of Display all the details of employees who works in department 89 or 63 - Rows

Cost:

Query visualization of Display all the details of employees who works in department 89 or 63 - Cost

Contribute your code and comments through Disqus.

Previous: Write a query in SQL to find all the details of employees whose last name is Gabriel or Dosio.
Next: Write a query in SQL to display the first name and last name of employees working for the department which allotment amount is more than Rs.50000.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming