Αποτελέσματα Αναζήτησης
The SQL CASE Expression. 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 result. If no conditions are true, it returns the value in the ELSE clause.
- The Try-Mysql Editor
SQL Statement: SELECT CustomerName, City, Country FROM...
- SQL Stored Procedures
The following SQL statement creates a stored procedure that...
- SQL Insert Into Select
The SQL INSERT INTO SELECT Statement. The INSERT INTO SELECT...
- MySQL Functions
Converts a string to lower-case: LEFT: Extracts a number of...
- SQL Select Into Statement
W3Schools offers free online tutorials, references and...
- SQL Operators
W3Schools offers free online tutorials, references and...
- The Try-Mysql Editor
13 Ιουν 2021 · Here you can find a complete guide for MySQL case statements in SQL. CASE WHEN some_condition THEN return_some_value ELSE return_some_other_value END
2 Ιουν 2023 · The SQL CASE statement allows you to perform IF-THEN-ELSE functionality within an SQL statement. Learn more about this powerful statement in this article. This article applies to Oracle, SQL Server, MySQL, and PostgreSQL.
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 expression in the WHEN clause, it returns the esle_result in the ELSE clause. The ELSE clause is optional.
31 Μαρ 2021 · In SQL, the CASE expression works like an "if-then-else" statement within a query. It evaluates given conditions and returns specific values based on those conditions. For example, CASE can categorize data or apply calculations to certain groups of values.
In this syntax, the CASE statement evaluates each WHEN condition in order, returning the corresponding result when a condition is true. If none of the conditions are true, the statement returns the result specified in the ELSE clause.
3 Σεπ 2024 · 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, and in clauses such as <select_list> , IN, WHERE, ORDER BY, and HAVING.