In SQL, what is the purpose of the LIKE operator? MCQ with Answer and Explanation

In SQL, what is the purpose of the LIKE operator?
A. To aggregate data
B. To perform arithmetic operations
C. To join tables
D. To perform pattern matching on strings
Answer: Option D
Solution (By JKExamLibrary)
LIKE is used with wildcards (% and _) to search for a specified pattern in a column.

This question belongs to: Computer Database Management System (DBMS)

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Database Management System (DBMS) Questions

Question #1 Report Error
Which of the following is a non-aggregate function in SQL?
A. AVG()
B. LENGTH()
C. SUM()
D. COUNT()

Correct Answer: Option B


Explanation:
LENGTH() (or LEN()) is a string function that returns the length of a string, not an aggregate. SUM, COUNT, AVG are aggregates.

This question belongs to: Computer Database Management System (DBMS)
Question #2 Report Error
Which of the following describes an 'Entity' in database terms?
A. An action or method inside code.
B. A line connecting tables.
C. A real-world object or concept that is distinguishable from other objects and about which data is stored.
D. A physical server rack.

Correct Answer: Option C


Explanation:
An Entity is a distinguishable real-world object, place, person, or concept captured within a database schema (e.g., Customer, Product).

This question belongs to: Computer Database Management System (DBMS)
Question #3 Report Error
Which of the following is a valid SQL statement to create a view?
A. CREATE VIEW view_name (columns) AS SELECT ...;
B. CREATE VIEW view_name AS SELECT ...;
C. Neither
D. Both A and B

Correct Answer: Option D


Explanation:
Both syntaxes are valid: CREATE VIEW view_name AS SELECT ... and with column aliases.

This question belongs to: Computer Database Management System (DBMS)