Yahoo Αναζήτηση Διαδυκτίου

Αποτελέσματα Αναζήτησης

  1. 13 Ιουν 2021 · 7 Answers. Sorted by: 82. The complete syntax depends on the database engine you're working with: For SQL Server: CASE case-expression. WHEN when-expression-1 THEN value-1. [ WHEN when-expression-n THEN value-n ... [ ELSE else-value ] END. or: CASE. WHEN boolean-when-expression-1 THEN value-1. [ WHEN boolean-when-expression-n THEN value-n ...

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

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

  4. 2 Ιουν 2023 · The CASE statement allows you to perform an IF-THEN-ELSE check within an SQL statement. It’s good for displaying a value in the SELECT query based on logic that you have defined. As the data for columns can vary from row to row, using a CASE SQL expression can help make your data more readable and useful to the user or to the application.

  5. 20 Απρ 2021 · ELSE statements into your Microsoft SQL Server T-SQL code. CASE is used within a SQL statement, such as SELECT or UPDATE. Don’t mistake CASE for the IF ELSE control of flow construct, which is used to evaluate the conditional execution of SQL statements. Let’s illustrate with an example.

  6. SQL Server CASE expression evaluates a list of conditions and returns one of the multiple specified results. The CASE expression has two formats: simple CASE expression and searched CASE expression. Both of CASE expression formats support an optional ELSE statement.

  7. 4 Νοε 2022 · The SQL CASE statement has the following syntax: CASE WHEN conditional_statement1 THEN result1. . . . . WHEN condition_statementN THEN resultN. ELSE result. END; When you use the CASE statement, it has to be followed by a WHEN and THEN the result if the first condition is met.

  1. Γίνεται επίσης αναζήτηση για