Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. Syntax. IF (condition, value_if_true, value_if_false) Parameter Values. Technical Details. Works in: From MySQL 4.0. More Examples. Example. Return 5 if the condition is TRUE, or 10 if the condition is FALSE: SELECT IF (500<1000, 5, 10); Try it Yourself » Example. Test whether two strings are the same and return "YES" if they are, or "NO" if not:

  2. I've been trying to figure out how I can make a query with MySQL that checks if the value (string $haystack) in a certain column contains certain data (string $needle), like this: SELECT * FROM `table` WHERE `column`.contains('{$needle}')

  3. 12 lut 2024 · Check if String Contains Certain Data in MySQL Table Using SELECT With the LOCATE() Function. One effective method to check if a particular string occurs in a MySQL table is by utilizing the SELECT statement along with the LOCATE() function.

  4. www.mysqltutorial.org › mysql-stored-procedure › mysql-if-statementMySQL IF Statement - MySQL Tutorial

    Summary. Use IF...THEN statement to conditionally execute a block of statements based on the evaluation of a specified condition. Use IF...THEN...ELSE statement to execute a block of statements if a specified condition is true and an alternative block of statements if the condition is false.

  5. 11 lip 2024 · SELECT IF (1 > 3, 'true', 'false'); -- The IF function checks if the condition '1 > 3' is true; if it is, it returns 'true', otherwise it returns 'false'. Explanation: The SELECT statement is used to evaluate expressions and return the result.

  6. The IF statement can have THEN, ELSE, and ELSEIF clauses, and it is terminated with END IF. If a given search_condition evaluates to true, the corresponding THEN or ELSEIF clause statement_list executes. If no search_condition matches, the ELSE clause statement_list executes.

  7. www.mysqltutorial.org › mysql-control-flow-functions › mysql-if-functionMySQL IF Function - MySQL Tutorial

    MySQL IF function is one of the MySQL control flow functions that returns a value based on a condition. The IF function is sometimes referred to as IF ELSE or IF THEN ELSE function. The syntax of the MySQL IF function is as follows: IF(expr,if_true_expr,if_false_expr) Code language: SQL (Structured Query Language) (sql)

  1. Ludzie szukają również