In MySQL, the RADIANS()
function converts a value from degrees to radians, and returns the result.
You provide the value in degrees as an argument when calling the function.
In MySQL, the RADIANS()
function converts a value from degrees to radians, and returns the result.
You provide the value in degrees as an argument when calling the function.
In MySQL, the DEGREES()
function converts a value from radians to degrees, and returns the result.
You provide the radian value as an argument when calling the function.
In MySQL, the CRC32()
function computes a cyclic redundancy check value and returns a 32-bit unsigned value.
CRC stands for Cyclic Redundancy Check. A CRC is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data (although, it doesn’t necessarily guard against malicious or intentional changes).
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()
.