Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 15 wrz 2008 · 30 Answers. Sorted by: 2052. The CASE statement is the closest to IF in SQL and is supported on all versions of SQL Server. SELECT CAST( CASE. WHEN Obsolete = 'N' or InStock = 'Y' THEN 1. ELSE 0. END AS bit) as Saleable, * FROM Product. You only need to use the CAST operator if you want the result as a Boolean value.

  2. The Transact-SQL statement that follows an IF keyword and its condition is executed if the condition is satisfied: the Boolean expression returns TRUE. The optional ELSE keyword introduces another Transact-SQL statement that is executed when the IF condition isn't satisfied: the Boolean expression returns FALSE .

  3. The IF...ELSE statement is a control-flow statement that allows you to execute or skip a statement block based on a specified condition. The IF statement. The following illustrates the syntax of the IF statement: IF boolean_expression . BEGIN . { statement_block } END Code language: SQL (Structured Query Language) (sql)

  4. 28 maj 2024 · The CASE statement acts as a logical IF-THEN-ELSE conditional statement. We can use it to perform conditional branching within the SELECT statement across various SQL databases , including SQL Server, MySQL, and PostgreSQL .

  5. 12 wrz 2022 · SQL ELSEIF and ELSE Condition. Like many other programming languages, T-SQL can pair the IF keyword with ELSE IF and ELSE to more easily check multiple mutually exclusive scenarios. When combined, the first statement must be a single IF statement. This can be optionally followed by one or more ELSE IF statements.

  6. Imposes conditions on the execution of a Transact-SQL statement. The Transact-SQL statement (sql_statement) following the boolean_expression is executed if the boolean_expression evaluates to TRUE. The optional ELSE keyword is an alternate Transact-SQL statement that is executed when boolean_expression evaluates to FALSE or NULL.

  7. 30 lis 2019 · Instrukcję IF THEN ELSE w SQL Server możemy używać w T-SQL m. in. w blokach anonimowych, procedurach, funkcjach, triggerach. Składnia T-SQL If Then Else wygląda następująco: --tomaszkenig.pl. IF Boolean_expression_1. {...polecenie wykonywane, gdy warunek_1 jest spełniony - ma wartość TRUE...} [ ELSE IF Boolean_expression_2 .

  1. Ludzie szukają również