In MySQL, the COT()
function returns the cotangent of a given value.
You provide the value as an argument when calling the function.
In MySQL, the COT()
function returns the cotangent of a given value.
You provide the value as an argument when calling the function.
In MySQL, the COS()
function returns the cosine of a given value, where the value is given in radians.
The cosine is the trigonometric function that is equal to the ratio of the side adjacent to an acute angle (in a right-angled triangle) to the hypotenuse.
In MySQL, the ABS()
function returns the absolute value of a given value.
An absolute value is the distance of a number on the number line from 0 without considering which direction from zero the number lies. Therefore, the absolute value of a number is always a non-negative value (i.e. it’s never negative).
In MySQL, the PI()
function returns the value of π (pi). The number π is a mathematical constant approximately equal to 3.14159 (although it can also be displayed with much greater precision than this).
The PI()
function displays π with a default precision of 7 (i.e. 3.141593), however MySQL uses the full double-precision value internally.
In MySQL, the RAND()
function allows you to generate a random number. Specifically, the function returns a random floating-point value v in the range 0 <= v < 1.0
.
You can also influence the random number by providing a seed value as an argument.
In MySQL, the ROUND()
function allows you to round a number up or down to a given number of decimal places.
The way it works is, you provide the number as an argument, and you have the option of choosing how many decimal places to round the number to. If you don’t specify the number of decimal places, the result will have no decimal places.
In MySQL, the CEILING()
function allows you to round a number up to the nearest integer. More specifically, it returns the smallest integer not less than its argument.
You can also use the CEIL()
function, which is a synonym for CEILING()
.
In MySQL, the FLOOR()
function allows you to round a number down to the nearest integer. More specifically, it returns the largest integer not larger than its argument.
In MySQL, the JSON_LENGTH()
function returns the length of a JSON document.
When you call this function, you provide the JSON document as an argument. You can also provide a path argument to return the length of a value within the document.
In MySQL, the JSON_DEPTH()
function returns the maximum depth of a JSON document.
When you call this function, you provide the JSON document as an argument.