Which of the following SQL queries correctly selects records where the…

PYQ IBPS SO CRP SPL-XIV (2024)

Which of the following SQL queries correctly selects records where the First_Name contains a specific pattern, the Last_Name also matches a pattern using LIKE, and the City does not match a given pattern using NOT LIKE?

  1. A.
    SELECT * FROM Employee
    WHERE First_Name LIKE '%A%'
    AND Last_Name LIKE '%K%'
    AND City NOT LIKE '%Delhi%';
  2. B.
    SELECT * FROM Employee
    WHERE First_Name = '%A%'
    AND Last_Name = '%K%'
    AND City != '%Delhi%';
  3. C.
    SELECT * FROM Employee
    WHERE First_Name IN '%A%'
    AND Last_Name IN '%K%'
    AND City NOT IN '%Delhi%';
  4. D.
    SELECT * FROM Employee
    WHERE First_Name LIKE '%A%'
    OR Last_Name LIKE '%K%'
    OR City NOT LIKE '%Delhi%';
  5. E.
    SELECT * FROM Employee
    WHERE First_Name NOT LIKE '%A%'
    AND Last_Name LIKE '%K%'
    AND City LIKE '%Delhi%';

Attempted by 63 students.

Sign up free to check your answer

Sign up free

Explore the full course: Ibps So It Mains

Loading lesson…