What does the CASE WHEN expression do in SQL?

SQL Fundamentals Easy

SQL Fundamentals — Easy

What does the CASE WHEN expression do in SQL?

Key points

  • CASE WHEN is used for conditional logic in SQL queries
  • It evaluates conditions and returns a result based on the first true condition
  • This expression is commonly used to transform data based on specific criteria

Ready to go further?

Related questions