Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. Use SIGN (). 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. Definition and Usage. The SUBSTRING_INDEX () function returns a substring of a string before a specified number of delimiter occurs. Syntax. SUBSTRING_INDEX (string, delimiter, number) Parameter Values. Technical Details. More Examples. Example. Return a substring of a string before a specified number of delimiter occurs:

  5. The SIGN() function returns:-1 if the number is negative. 0 if the number is zero. 1 if the number is positive. For instance, if you want to determine the sign of -5, you can use the SIGN() function as follows: SELECT SIGN(-5); This will return: -1. Similarly, for a positive number and zero: SELECT SIGN(5); -- Returns 1 SELECT SIGN(0); -- Returns 0

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

  7. The SIGN () function function returns sign of the argument as 1, 0, or -1, depending on whether the argument is positive, zero, or negative. If number is positive, the function will return 1. If number is zero, the function will return 0. If number negative, the function will return -1.