Bird
Raised Fist0

Identify the error in this SQL query:

medium📝 Debug Q6 of Q15
C Sharp (C#) - LINQ Fundamentals

Identify the error in this SQL query:
SELECT * FROM Products WHERE Price => 100;

AWHERE clause cannot use comparison operators
BMissing semicolon at the end
CPrice should be in quotes
DThe operator => is invalid; should be >= instead
Step-by-Step Solution
Solution:
  1. Step 1: Check the comparison operator syntax

    The operator => is not valid in SQL; the correct operator for 'greater than or equal' is >=.
  2. Step 2: Validate other parts

    Semicolon is optional in many systems, Price is a column so no quotes needed, WHERE supports comparisons.
  3. Final Answer:

    The operator => is invalid; should be >= instead -> Option D
  4. Quick Check:

    Use >= for greater or equal, not => [OK]
Quick Trick: Use >=, not => for greater or equal [OK]
Common Mistakes:
MISTAKES
  • Swapping operator order
  • Quoting column names unnecessarily
  • Thinking WHERE disallows comparisons

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Sharp (C#) Quizzes