w3resource
SQL exercises

SQL Subquery Exercises: Find all the details of employees whose last name is Gabriel or Dosio

SQL SUBQUERY: Exercise-34 with Solution

34. Write a query in SQL to find all the details of employees whose last name is Gabriel or Dosio.

Sample table: emp_details


Sample Solution:

SELECT * 
  FROM emp_details
   WHERE emp_lname IN ('Gabriel' , 'Dosio');

Output :

SQL Subqueries: Find all the details of employees whose last name is Gabriel or Dosio

Practice Online


Sample Database:

Model Database

Query Visualization:

Duration:

Query visualization of Find all the details of employees whose last name is Gabriel or Dosio - Duration

Rows:

Query visualization of Find all the details of employees whose last name is Gabriel or Dosio - Rows

Cost:

Query visualization of Find all the details of employees whose last name is Gabriel or Dosio - Cost

Contribute your code and comments through Disqus.

Previous: Write a SQL query to display the name of each company, price for their most expensive product along with their ID.
Next: Write a query in SQL to display all the details of employees who works in department 89 or 63.

What is the difficulty level of this exercise?



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