About 515,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 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 …

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

  5. SQL CASE Statement in WHERE Clause Examples

    Oct 3, 2025 · Learn about different ways you can use a CASE statement in the WHERE clause for a T-SQL statement with these several examples.

  6. SQL CASE Expression

    This tutorial shows you how to use two forms of SQL CASE expressions including simple CASE and searched CASE expressions.

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

    Sep 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, …

  8. How to Use CASE statement in SQL: Explained with Examples

    Jun 28, 2023 · When working with SQL case statements, sometimes nesting case expressions becomes necessary for more complex query conditions. In this section, we’ll discuss how to …

  9. 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 …

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

    Aug 20, 2024 · The SQL CASE statement is a handy tool that allows us to add conditional logic to our queries. It’s particularly useful when we need to categorize or transform data based on …