Software Development Exam  >  Software Development Questions  >  Consider the following table "employees&... Start Learning for Free
Consider the following table "employees":
+----+----------+-----------+
| id | name | salary |
+----+----------+-----------+
| 1 | John | 50000 |
| 2 | Alice | 60000 |
| 3 | Bob | 45000 |
+----+----------+-----------+
Which SQL query will retrieve the names of employees whose names contain the letter "o"?
  • a)
    SELECT name FROM employees WHERE name LIKE '%o%';
  • b)
    SELECT name FROM employees WHERE name LIKE 'o%';
  • c)
    SELECT name FROM employees WHERE name LIKE '%o';
  • d)
    SELECT name FROM employees WHERE name = 'o';
Correct answer is option 'A'. Can you explain this answer?
Most Upvoted Answer
Consider the following table "employees":+----+----------+--...
This query retrieves the names of employees from the "employees" table whose names contain the letter "o" using the LIKE operator and wildcard "%".
Free Test
Community Answer
Consider the following table "employees":+----+----------+--...

Explanation:

SQL Query Explanation:
The SQL query retrieves the names of employees whose names contain the letter "o" by using the LIKE operator with the wildcard symbol %.

Query Breakdown:
- SELECT name: Specifies the column to be retrieved from the table.
- FROM employees: Specifies the table from which to retrieve the data.
- WHERE name LIKE %o%: Filters the results to only include rows where the name column contains the letter "o" anywhere in the name.

Why Option A is Correct:
- Option A correctly uses the LIKE operator with the wildcard symbols % before and after the letter "o" to match any occurrence of the letter "o" in the name column.
- Options B, C, and D do not use the wildcard symbols correctly or do not include them at all, which would not provide the desired result of retrieving names containing the letter "o".

Therefore, the correct SQL query to retrieve the names of employees whose names contain the letter "o" is SELECT name FROM employees WHERE name LIKE %o%;.
Explore Courses for Software Development exam

Top Courses for Software Development

Consider the following table "employees":+----+----------+-----------+| id | name | salary |+----+----------+-----------+| 1 | John | 50000 || 2 | Alice | 60000 || 3 | Bob | 45000 |+----+----------+-----------+Which SQL query will retrieve the names of employees whose names contain the letter "o"?a)SELECT name FROM employees WHERE name LIKE %o%;b)SELECT name FROM employees WHERE name LIKE o%;c)SELECT name FROM employees WHERE name LIKE %o;d)SELECT name FROM employees WHERE name = o;Correct answer is option 'A'. Can you explain this answer?
Question Description
Consider the following table "employees":+----+----------+-----------+| id | name | salary |+----+----------+-----------+| 1 | John | 50000 || 2 | Alice | 60000 || 3 | Bob | 45000 |+----+----------+-----------+Which SQL query will retrieve the names of employees whose names contain the letter "o"?a)SELECT name FROM employees WHERE name LIKE %o%;b)SELECT name FROM employees WHERE name LIKE o%;c)SELECT name FROM employees WHERE name LIKE %o;d)SELECT name FROM employees WHERE name = o;Correct answer is option 'A'. Can you explain this answer? for Software Development 2025 is part of Software Development preparation. The Question and answers have been prepared according to the Software Development exam syllabus. Information about Consider the following table "employees":+----+----------+-----------+| id | name | salary |+----+----------+-----------+| 1 | John | 50000 || 2 | Alice | 60000 || 3 | Bob | 45000 |+----+----------+-----------+Which SQL query will retrieve the names of employees whose names contain the letter "o"?a)SELECT name FROM employees WHERE name LIKE %o%;b)SELECT name FROM employees WHERE name LIKE o%;c)SELECT name FROM employees WHERE name LIKE %o;d)SELECT name FROM employees WHERE name = o;Correct answer is option 'A'. Can you explain this answer? covers all topics & solutions for Software Development 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider the following table "employees":+----+----------+-----------+| id | name | salary |+----+----------+-----------+| 1 | John | 50000 || 2 | Alice | 60000 || 3 | Bob | 45000 |+----+----------+-----------+Which SQL query will retrieve the names of employees whose names contain the letter "o"?a)SELECT name FROM employees WHERE name LIKE %o%;b)SELECT name FROM employees WHERE name LIKE o%;c)SELECT name FROM employees WHERE name LIKE %o;d)SELECT name FROM employees WHERE name = o;Correct answer is option 'A'. Can you explain this answer?.
Solutions for Consider the following table "employees":+----+----------+-----------+| id | name | salary |+----+----------+-----------+| 1 | John | 50000 || 2 | Alice | 60000 || 3 | Bob | 45000 |+----+----------+-----------+Which SQL query will retrieve the names of employees whose names contain the letter "o"?a)SELECT name FROM employees WHERE name LIKE %o%;b)SELECT name FROM employees WHERE name LIKE o%;c)SELECT name FROM employees WHERE name LIKE %o;d)SELECT name FROM employees WHERE name = o;Correct answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for Software Development. Download more important topics, notes, lectures and mock test series for Software Development Exam by signing up for free.
Here you can find the meaning of Consider the following table "employees":+----+----------+-----------+| id | name | salary |+----+----------+-----------+| 1 | John | 50000 || 2 | Alice | 60000 || 3 | Bob | 45000 |+----+----------+-----------+Which SQL query will retrieve the names of employees whose names contain the letter "o"?a)SELECT name FROM employees WHERE name LIKE %o%;b)SELECT name FROM employees WHERE name LIKE o%;c)SELECT name FROM employees WHERE name LIKE %o;d)SELECT name FROM employees WHERE name = o;Correct answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider the following table "employees":+----+----------+-----------+| id | name | salary |+----+----------+-----------+| 1 | John | 50000 || 2 | Alice | 60000 || 3 | Bob | 45000 |+----+----------+-----------+Which SQL query will retrieve the names of employees whose names contain the letter "o"?a)SELECT name FROM employees WHERE name LIKE %o%;b)SELECT name FROM employees WHERE name LIKE o%;c)SELECT name FROM employees WHERE name LIKE %o;d)SELECT name FROM employees WHERE name = o;Correct answer is option 'A'. Can you explain this answer?, a detailed solution for Consider the following table "employees":+----+----------+-----------+| id | name | salary |+----+----------+-----------+| 1 | John | 50000 || 2 | Alice | 60000 || 3 | Bob | 45000 |+----+----------+-----------+Which SQL query will retrieve the names of employees whose names contain the letter "o"?a)SELECT name FROM employees WHERE name LIKE %o%;b)SELECT name FROM employees WHERE name LIKE o%;c)SELECT name FROM employees WHERE name LIKE %o;d)SELECT name FROM employees WHERE name = o;Correct answer is option 'A'. Can you explain this answer? has been provided alongside types of Consider the following table "employees":+----+----------+-----------+| id | name | salary |+----+----------+-----------+| 1 | John | 50000 || 2 | Alice | 60000 || 3 | Bob | 45000 |+----+----------+-----------+Which SQL query will retrieve the names of employees whose names contain the letter "o"?a)SELECT name FROM employees WHERE name LIKE %o%;b)SELECT name FROM employees WHERE name LIKE o%;c)SELECT name FROM employees WHERE name LIKE %o;d)SELECT name FROM employees WHERE name = o;Correct answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider the following table "employees":+----+----------+-----------+| id | name | salary |+----+----------+-----------+| 1 | John | 50000 || 2 | Alice | 60000 || 3 | Bob | 45000 |+----+----------+-----------+Which SQL query will retrieve the names of employees whose names contain the letter "o"?a)SELECT name FROM employees WHERE name LIKE %o%;b)SELECT name FROM employees WHERE name LIKE o%;c)SELECT name FROM employees WHERE name LIKE %o;d)SELECT name FROM employees WHERE name = o;Correct answer is option 'A'. Can you explain this answer? tests, examples and also practice Software Development tests.
Explore Courses for Software Development exam

Top Courses for Software Development

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev