JOINS in MariaDB

MariaDB JOINS To retrieve data from multiple tables, the MariaDB Join Query is used. Types of Joins: There are mainly three types of Joins that the MariaDB database supports. These are: Inner or Simple Join Left Outer Join or Left Join Right Outer Join or Right Join   INNER JOIN The INNER Join is the … Read more

AVG function in MariaDB

MariaDB AVG To get the average value of an expression, the MariaDB AVG function is used. Syntax 1: SELECT expressions, AVG (aggregate_expression) FROM table_name WHERE conditions; Syntax 2: To calculate average and grouping the results by one or more columns. SELECT expression1, expression2, … expression_n, AVG(aggregate_expression) FROM tables WHERE conditions GROUP BY expression1, expression2, … … Read more

MAX function in MariaDB

MariaDB MAX To get the maximum value from a column in the table, the MariaDB MAX function is used. Syntax: SELECT expressions, MAX (aggregate_expression) FROM table_name WHERE conditions; Parameters: Aggregate_expression: It is used to specify the column or expression to be utilised by the aggregate function. Example 1: Using Group By Clause. Players Table: ID … Read more

COUNT function in MariaDB

MariaDB COUNT To get the count of an expression, the MariaDB COUNT function is used. Syntax: SELECT expressions, COUNT (aggregate_expression) FROM table_name WHERE conditions; Parameters: Aggregate_expression: It is used to specify the column or expression to be utilised by the aggregate function. Example 1: Using Group By Clause. Players Table: ID NAME SPORTS 1 Sachin … Read more

MIN function in MariaDB

MariaDB MIN To get the minimum value from a column in the table, the MariaDB MIN function is used. Syntax: SELECT expressions, MIN (aggregate_expression) FROM table_name WHERE conditions; Parameters: Aggregate_expression: It is used to specify the column or expression to be utilised by the aggregate function. Example 1: Using Group By Clause. Players Table: ID … Read more

SUM function in MariaDB

MariaDB SUM To get the summed value of an expression, the MariaDB SUM function is used. Syntax 1: SELECT expressions, SUM (aggregate_expression) FROM table_name WHERE conditions; Syntax 2: To calculate SUM and grouping the results by one or more columns. SELECT expression1, expression2, … expression_n, SUM(aggregate_expression) FROM tables WHERE conditions GROUP BY expression1, expression2, … … Read more

FROM clause in MariaDB

MariaDB FROM MariaDB FROM clause is used to specify the tables from which the records needs to be retrieved. It thus has a mandatory existence with the MariaDB SELECT statement. Syntax: To select all fields from a table. SELECT * FROM table_name; Example: Selecting all fields from a table. SELECT * FROM Players;SELECT * FROM … Read more

DISTINCT clause in MariaDB

MariaDB DISTINCT The MariaDB DISTINCT clause is used with the SELECT statement to eliminate the duplicate records from the result set. Syntax: SELECT DISTINCT columns FROM tables WHERE conditions; Parameters: conditions: It is used to specify the conditions to be strictly fulfilled for the selection. Example 1: Using Distinct Select for single column. Players table: … Read more

ORDER BY in MariaDB

MariaDB ORDER BY MariaDB ORDER BY clause is used with the MariaDB SELECT statement to sort or re-arrange the records in the result set. Syntax: SELECT expressions FROM table_name WHERE conditions; ORDER BY expression [ ASC | DESC ]; Parameters: ASC: It is an optional parameter which is used to specify the sorting order to … Read more

LIKE Operator in MariaDB

MariaDB LIKE To filter the results, the MariaDB LIKE condition is used with a combination of WHERE Clause in SELECT, INSERT, UPDATE and DELETE statements to perform pattern matching. Syntax: WHERE expressions LIKE pattern [ ESCAPE ‘escape_character’ ] Parameters: expressions: It is used to specify a column or a field. pattern: It is used to … Read more