A university stores student information in a table called st…
A university stores student information in a table called students. The registrar wants to list students who are not from New York. Which query should be used? SELECT * FROM students WHERE city = ‘New York’ SELECT * FROM students WHERE NOT city = ‘New York’ SELECT * FROM students WHERE city ‘New York’ SELECT * FROM students WHERE city != ‘New York’ Answer: SELECT * FROM students WHERE NOT city = ‘New York’ Explanation: Using NOT before the condition excludes records that match New York. and != are valid alternatives in some SQL dialects, but NOT is the most universally clear and correct given the teaching context. Simply using = would only return New York, not exclude it.
Read Details