w3resource
SQL exercises

SQL: Display all the data of employees whose last name begins with the letter 'D'

SQL Wildcard & Special Operator : Exercise-22 with Solution

Write a query in SQL to display all the data of employees whose last name begins with an 'D'.

Sample table: emp_details


Sample Solution :

SELECT * 
 FROM emp_details
  WHERE emp_lname LIKE 'D%'; 

Output:

Syntax of using where clause with not operator and NULL

Query Visualization:

Duration:

Query visualization of Display all the data of employees whose last name begins with the letter 'D' - Duration

Rows:

Query visualization of Display all the data of employees whose last name begins with the letter 'D' - Rows

Cost:

Query visualization of Display all the data of employees whose last name begins with the letter 'D' - Cost

Practice Online


Contribute your code and comments through Disqus.

Previous: Write a SQL statement to find that customer with all information who gets a grade except NULL value.
Next: SQL Aggregate Functions Exercises Home

What is the difficulty level of this exercise?



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