w3resource
SQL exercises

SQL: Find those employees whose last name is Dosni or Mardy

SQL Boolean Operator Statement : Exercise-11 with Solution.

Write a query in SQL to find the data of employees whose last name is Dosni or Mardy.

Sample table : emp_details


Sample Solution :

SELECT * 
 FROM emp_details
  WHERE emp_lname ='Dosni' OR emp_lname= 'Mardy';

Output:

Find employees for a specific last name

Query Visualization:

Duration:

Query visualization of Find those employees whose last name is Dosni or Mardy - Duration

Rows:

Query visualization of Find those employees whose last name is Dosni or Mardy - Rows

Cost:

Query visualization of Find those employees whose last name is Dosni or Mardy - Cost

Practice Online


Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a SQL query to display order number, purchase amount, achived, the unachieved percentage for those order which exceeds the 50% of the target value of 6000.
Next: Write a query in SQL to display all the data of employees that work in department 47 or department 63.

What is the difficulty level of this exercise?



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