Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 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)

  2. You can use 'sign' with a decode. Sign will return -1 for any negative, 0 for 0, and 1 for any positive: select decode (sign (money_return), -1, abs (money_return), 1, money_return*10, money_return) from cash_t; edited Oct 7, 2019 at 14:04.

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

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

  5. The SQL SIGN () function is used to determine whether a number is positive, negative, or zero. Assume we have a table with a column that stores the value in both negative and positive integers. Then, to detect the positive and negative numbers, we can use the SIGN () function.

  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. This page explores the most frequently used MySQL math functions with practical & real-world examples. Returns the smallest integer value greater than or equal to the input number (n). Rounds a number to a specified number of decimal places. Returns the arc cosine of n or null if n is not in the range -1 and 1.

  1. Ludzie szukają również