MySQL COUNT() Function17 Mar 2025 | 1 min read The count() is a Math function of MySQL. This function is used to get the total count for a particular column of the table. SyntaxParametercolumn_name: It is the column name to get the count. table_name: It is the name of the table in which column name is present. ReturnsThis function returns the count of an expression. Example 1Output: ![]() ![]() Example 2Output: ![]() ![]() Next TopicMySQL Math |
MySQL LEAST() Function The least() is a Math function of MySQL. This function is used to get the smallest number from the list. Syntax select least(exp1, exp2, exp3.....); Prameter: Exp1, exp2, exp3.... expn : expressions for getting smallest number. Returns This function returns the smallest number from the list. Example 1 Select least(4,3,2,7); Output: Example 2 Select least(javatpoint','string_finction','math_function','date_function'); Output: Example...
1 min read
MySQL DEGREES() Function The degrees() is a Math function of MySQL. This function is used to convert the given radian number into a degree. Syntax select degrees(number); Parameter number: It is the number to be converted into a degree. Example 1 Select degrees(34); Output: Example 2 Select degrees(4.5); Output: Example 3 Select degrees(-5); Output: TopicMySQL Math ...
1 min read
MySQL GREATEST() Function The greatest() is a Math function of MySQL. This function is used to get the largest number from the list. Syntax select greatest(exp1, exp2, exp3....); Prameter: Exp1, exp2, exp3.... expn : expressions for getting largest number. Returns This function returns the largest number from the list. Example 1 Select greatest(4,5,3,9,0); Output: Example 2 Select greatest('j','a','v','a'); Output: Example...
1 min read
MySQL LOG() Function The Log() is a Math function of MySQL. This function is used to return either the natural logarithm of the given number if it has one parameter or specified base logarithm number if it has two parameters. Syntax select Log(number); Select log(base, number); Parameters: number : It is the...
1 min read
MySQL RAND() Function The rand() is a Math function of MySQL. This function is used to generate the random number. Syntax select rand(); Returns This function returns a random number or a random number within a range. Example 1 Select rand(); Output: Example 2 select rand()*3; Output: Example 3 Select rand()-0.4; Output: TopicMySQL Math ...
1 min read
MySQL DIV() Function The div() is a Math function of MySQL. This function is used for integer division, in which n is the number to be divided by the number m. Syntax select n div m; Parameter n : It is the number to be divided by m m : It is...
1 min read
MySQL PI() Function The pi() is a Math function of MySQL. This function is used to get the value of pi upto 6 decimal places. Syntax select pi(); Returns This function returns the value of ? (pi) displayed with 6 decimal places. Example 1 select pi(); Output: Example 2 select pi()+12; Output: TopicMySQL Math ...
1 min read
MySQL MOD() Function The mod() is a Math function of MySQL. This function is used to get the remainder of given values. Syntax select mod(n,m); Or Select n mod m; Or Select n % m; Parameter: n: number to be divided by m m: number that will divide n Returns This function returns the remainder of n divided...
1 min read
MySQL SUM() Function The sum() is a Math function of MySQL. This function is used to sum the values of given expressions. Syntax select sum(aggregate_expression) from tables [where conditions]; Parameter: aggregate_expression: It is the column to be summed. tables: It is the name of the table in which given aggregate_expression is present. where...
1 min read
MySQL POWER() Function The power() is a Math function of MySQL. This function is used to get the power of the given values. Syntax select power(m,n); Parameter: m: It is base value in the calculation n: It is exponent value in the calculation Returns This function returns m raised to the nth power. Example 1 Select...
1 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India