Conditions in MariaDB

Conditions in MariaDB are generally used with SELECT statement, with CRUD operations. Below is the list of conditions supported in MariaDB.   CONDITION USES AND When 2 or more conditions to be met. OR When any one of the conditions are met. AND & OR When AND & OR both conditions are met. LIKE Simple … Read more

Regular Expressions in MariaDB

MariaDB Regular Expressions Regular expression-based matching is possible in MariaDB through the REGEXP Operator. Syntax: expression REGEXP pattern   Parameters: expression: It is used to specify a character expression such as a column or field. pattern: It is used to specify the regular expression matching information. The value of the pattern can be:   VALUE … Read more

Procedure in MariaDB

MariaDB Procedure A procedure in MariaDB can be simply understood as a stored program that is used to pass parameters into it. However, unlike functions, it does not return a value. MariaDB Create Procedure: Syntax: To create a procedure in MariaDB database. CREATE [ DEFINER = { CURRENT_USER | user_name } ] PROCEDURE procedure_name [ … Read more

Function in MariaDB

MariaDB Functions A function in MariaDB can be simply understood as a stored program that is used to pass parameters into them and that returns a value. MariaDB allow the users to create their own function. It also facilitates to eliminate or remove an already existing function from the MariaDB database. MariaDB Create Function: Syntax: … Read more

MariaDB Export

MariaDB Export To export a MariaDB database using HeidiSQL, follow the below steps: Right-click on your database name in the left column. Select “Export database as SQL” from the dropdown menu. Select the location to export your database Specify a name also and then click on the export button. The database is thus exported. Click … Read more

INTERSECT Operator in MariaDB

MariaDB INTERSECT The MariaDB INTERSECT operator is used to get the common or intersecting records from the corresponding columns of the selected tables. Each SELECT statement however must have the same number of expressions, and each corresponding expression should be of the same data type. Syntax: SELECT expr_1, expr_2, … expr_n FROM table1 WHERE conditions … Read more

UNION ALL operator in MariaDB

MariaDB UNION ALL To combine the output sets of two or more MariaDB SELECT statements, without removing the duplicate rows between the SELECT statements’ results, the MariaDB UNION ALL operator is used. Each SELECT statement however must have the same number of expressions, and each corresponding expression should be of the same data type. Syntax: … Read more

UNION operator in MariaDB

MariaDB UNION To combine the output sets of two or more MariaDB SELECT statements, thus removing the duplicate rows between the SELECT statements’ results, the MariaDB UNION operator is used. Each SELECT statement however must have the same number of expressions, and each corresponding expression should be of the same data type. Syntax: SELECT expr_1, … Read more

Right Outer Join in MariaDB

RIGHT JOIN The MariaDB Right Outer Join query returns all the rows from the Right table for the specified fields. For the Left table, it only returns those rows where the join condition is met. Syntax: SELECT expr_1, expr_2, … expr_n FROM table_1 RIGHT JOIN table_2 ON join_predicate; Example: Players Table: ID NAME SPORTS 1 … Read more

Left Outer join in MariaDB

LEFT JOIN The MariaDB Left Outer Join query returns all the rows from the Left table for the specified fields. For the Right table, it only returns those rows where the join condition is met. Syntax: SELECT expr_1, expr_2, … expr_n FROM table_1 LEFT JOIN table_2 ON join_predicate; Example: Players Table: ID NAME SPORTS 1 … Read more