Question
Easy

Consider the following SQL query to retrieve ecode of employees from EMPLOYEE table, whose address contains 'INDIA': SELECT ecode FROM EMPLOYEE WHERE _______; Which of the following is most suitable to complete the query?

1
address LIKE '_INDIA_'
2
address = %INDIA%
3
address AS '%INDIA_'
4
address LIKE '%INDIA%'
Question Details
Time to Solve: 12
Exam: HTET
Level/Paper: Level 3
Chapter: Database Management System (DBMS) & SQL
Topic: SQL
Correct Answer
Option D
Explanation

The correct option is (4): The correct option is address LIKE '%INDIA%'. In Structured Query Language (SQL), when you need to search for a string that appears anywhere within a column's text, you must employ the LIKE operator along with the appropriate wildcard characters. The percent sign (%) is the standard SQL wildcard that represents any sequence of zero or more characters. By placing a percent sign both before and…Read More