About 418,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. CASE (Transact-SQL) - SQL Server | Microsoft Learn

    Nov 18, 2025 · CASE can be used in any statement or clause that allows a valid expression. For example, you can use CASE in statements such as SELECT, UPDATE, DELETE and SET, …

  3. 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.

  4. 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. The CASE …

  5. SQL CASE Statement in WHERE Clause Examples

    Oct 3, 2025 · We usually define a static condition or value, however, if you need to filter data based on different conditions, this can be done using SQL CASE in the WHERE clause. This …

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

    Oct 7, 2025 · In this guide, we break down how to use the SQL CASE WHEN statement with multiple conditions across platforms like MySQL, SQL Server, Oracle, and PostgreSQL. By the …

  7. SQL CASE Expression

    Summary: in this tutorial, you will learn how to use the SQL CASE expression to add if-else logic to the SQL statements. The CASE expression allows you to add if-else logic to queries, …

  8. SQL CASE Examples with Multiple Conditions - Database.Guide

    Aug 20, 2024 · In this article, we’ll explore how to use the CASE statement with multiple conditions, providing simple examples that should work across most major relational database …

  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 WHEN Explained — Conditional Logic Made Simple

    Beginner-friendly guide to SQL CASE WHEN: learn simple and searched CASE, nested CASE, using CASE in SELECT, UPDATE and ORDER BY, plus practical examples.