48.6k views
1 vote
Write a SQL query to display the Name of all those employee whose ENAME Field

contains 4 th character as ‘S’ from the table EMPLOYEE.

User Swiecki
by
7.2k points

1 Answer

1 vote

Answer:

The SQL query to display the name of all employees whose ENAME field contains the 4th character as 'S' from the table EMPLOYEE is:

SELECT NAME

FROM EMPLOYEE

WHERE ENAME LIKE '___S%';

Step-by-step explanation:

In this query, we use the LIKE operator to match the pattern. The underscore symbol (_) matches any single character and the percentage symbol (%) matches any sequence of zero or more characters. So, the pattern '___S%' matches any string that has 'S' as the fourth character.

User Neea
by
7.0k points