About 497,000 results
Open links in new tab
  1. SQL CASE Expression - W3Schools

    The CASE expression goes through conditions and returns a value when the first condition is met (like an if-then-else statement). So, once a condition is true, it will stop reading and return the …

  2. How to Use the CASE Statement in SQL (With Examples)

    Learn how to use the SQL `CASE` statement to implement conditional logic efficiently. Explore its syntax, use cases, best practices, and performance considerations.

  3. SQL CASE WHEN with Multiple Conditions – Syntax, Examples

    Oct 7, 2025 · Master SQL CASE WHEN with multiple conditions in MySQL, PostgreSQL, SQL Server & Oracle. Learn syntax, examples, and tips for interviews.

  4. SQL CASE WHEN Explained: 10 Easy Examples for Beginners

    Jan 16, 2024 · In this article, you'll find real-world practical exercises using the CASE WHEN statement for data analysis. This statement enables analysts to craft customized logic for …

  5. SQL CASE Statement in WHERE Clause Examples

    Oct 3, 2025 · We can use CASE in SQL statements such as SELECT, WHERE, and ORDER BY. The CASE statement in the WHERE clause can conditionally filter rows based on defined …

  6. CASE (Transact-SQL) - SQL Server | Microsoft Learn

    Sep 18, 2025 · Within a SELECT statement, the CASE expression allows for values to be replaced in the result set based on comparison values. The following example uses the CASE …

  7. SQL CASE Expression

    The CASE statement returns the result_1, result_2, or result_3 if the expression matches the corresponding expression in the WHEN clause. If the expression does not match any …

  8. SQL CASE Statement - GeeksforGeeks

    Dec 10, 2024 · In this article, we'll learn the SQL CASE statement in detail, with clear examples and use cases that show how to leverage this feature to improve your SQL queries.

  9. Using CASE Statements in SQL SELECT Queries - Baeldung

    Nov 29, 2024 · CASE statements are a way to add if-then logic to SQL SELECT queries. They test conditions and return different values based on the results. This makes queries more …

  10. SQL CASE Statement Explained with Real-World Examples

    Jul 14, 2025 · In this quick guide, you’ll explore how to use CASE to implement branching logic in your queries. We’ll cover its two forms, show real-world use cases, and explain where and …