Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. It returns "0" for 0, "1" for positive and "-1" for negative values. SELECT DECODE( SIGN(money_return), 0, money_return, 1, money_return * 10, - 1, ABS(money_return) ) FROM CASH_T;

  2. 26 kwi 2016 · Simply use SIGN() in mysql It returns 1 as a positive value and -1 is a negative value. Example. SELECT SIGN(500); -- (Output is 1) SELECT SIGN(2500); -- (Output is 1) SELECT SIGN(-999); -- (Output is -1) SELECT SIGN(-5); -- (Output is -1)

  3. 19 paź 2018 · In MySQL, the SIGN() function returns the sign of a number. That is, it indicates whether or not the value is a positive number, a negative number, or zero. You provide the value as an argument when calling the function.

  4. 28 wrz 2020 · SIGN() function in MySQL is used to return the sign of the given number. It returns 1 if the number is positive, -1 if the number is negative and 0 for zero. Syntax : SIGN(X) Parameter : SIGN() function accepts one parameter as input and will give you the results in values like Positive(+1),Negative(-1) and Zero(0).

  5. 20 sty 2021 · Master MySQL commands with a downloadable PDF MySQL Commands Cheat Sheet. Find all the commonly used MySQL commands in the cheat sheet.

  6. 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:

  7. There are several effective methods to detect if a value in MySQL is a number: 1. Using Regular Expressions: Regular expressions offer a powerful way to match patterns in strings. To check for numbers, you can use the following expression: SELECT * FROM myTable WHERE col1 REGEXP '^[0-9]+$';

  1. Ludzie szukają również