SQL SORTING and FILTERING on HR Database: Display all those employees whose first name or last name starts with the letter D
SQL SORTING and FILTERING on HR Database: Exercise-36 with Solution
36. Write a query in SQL to display all those employees whose first name or last name starts with the letter D.
Sample table : employees
SELECT first_name, last_name FROM employees WHERE first_name LIKE 'D%' OR last_name LIKE 'D%';
first_name | last_name ------------+----------- Lex | De Haan David | Austin Diana | Lorentz Daniel | Faviet Den | Raphaely Curtis | Davies David | Bernstein Louise | Doran Danielle | Greene David | Lee Julia | Dellinger Jennifer | Dilly Donald | OConnell Douglas | Grant (14 rows)
Contribute your code and comments through Disqus.
Previous: Write a query in SQL to display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000.
Next: Write a query in SQL to display the details of jobs which minimum salary is greater than 9000.
What is the difficulty level of this exercise?