Skip to content
RED SAG Skills
easy5 pts · first answer countsdatabasessqlperformance

Checking if any rows exist

Code checks whether a user has any orders with `SELECT COUNT(*) FROM orders WHERE user_id = $1` and compares the result with 0. What is usually faster?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions