Search This Blog

MariaDB Tutorial

 

mariaDB turotial

MariaDB Tutorial

MariaDB is an open-source relational database technology. It is a great alternative or drop-in replacement for MySQL.

Our tutorial will start with the basics of MariaDB such as how to retrieve and manipulate data. Then we will move to the more advanced topics such as how to create tables, functions, procedures, and triggers. We will conclude with a review of the functions that are proprietary to MariaDB.

With this tutorial, you should be on your way to becoming proficient in MariaDB and its programming language.

Prerequisites

There are no prequisities for this MariaDB tutorial. You should be able to easily understand this tutorial and learn the basic concepts of MariaDB as you progress to the more advanced topics.

Now, let's get started!

Start Tutorial

Or jump directly to a topic in MariaDB:

MariaDB Functions

Functions - AlphabeticalMariaDB Functions listed alphabetically
Functions - CategoryMariaDB Functions listed by category

MariaDB Keys, Constraints and Indexes

Primary KeysCreate, alter, and drop primary keys
Unique ConstraintsCreate, add, and drop unique constraints
IndexesCreate, drop and rename indexes (performance tuning)

MariaDB Privileges and Passwords

Grant/Revoke PrivilegesGrant or revoke privileges
Change PasswordChange a user's password

MariaDB Database Administration

UsersDatabase accounts

MariaDB Programming

FunctionsCreate and drop functions
ProceduresCreate and drop procedures
CursorsCreate cursors within stored programs
Literals (Constants)String, number, date, time, boolean literals
Declaring VariablesDeclare variables within stored programs
Loops and Conditional StatementsLOOP statement, IF-THEN-ELSE and others
AUTO_INCREMENT (Sequences)Create a sequence of numbers using the AUTO_INCREMENT attribute
Comments within SQLHow to create comments within your SQL statement

MariaDB Comparison Operators

Comparison OperatorsOperators such as =, <>, !=, >, <, and so on

MariaDB Query Types

SELECT StatementRetrieve records from one or more tables
SELECT LIMIT StatementRetrieve records from a table and limit results
INSERT StatementInsert records into a table
UPDATE StatementUpdate existing records in a table
DELETE StatementDelete records from a table
DELETE LIMIT StatementDelete records and limit number of deletions
TRUNCATE TABLE StatementDelete all records from a table (no rollback)
UNION OperatorCombine 2 result sets (removes duplicates)
UNION ALL OperatorCombine 2 result sets (includes duplicates)
INTERSECT OperatorIntersection of 2 result sets
SubqueriesA query within a query

MariaDB Joins

JOIN TablesInner and Outer joins

MariaDB Aliases

ALIASESCreate a temporary name for a column or table

MariaDB Clauses

DISTINCT ClauseRemove duplicates from the results
FROM ClauseList tables and join information
WHERE ClauseFilter results
ORDER BY ClauseSort query results
GROUP BY ClauseGroup by one or more columns
HAVING ClauseRestrict the groups of returned rows

MariaDB SQL Functions

COUNT FunctionReturn the count of an expression
SUM FunctionReturn the sum of an expression
MIN FunctionReturn the min of an expression
MAX FunctionReturn the max of an expression
AVG FunctionReturn the average of an expression

MariaDB Conditions

AND Condition2 or more conditions to be met
OR ConditionAny one of the conditions are met
AND and ORCombine AND and OR conditions
LIKE ConditionUse simple pattern matching (wildcards) in a WHERE clause
RLIKE ConditionUse regular expression matching in a WHERE clause
IN ConditionAlternative to multiple OR conditions
NOT ConditionNegate a condition
IS NULL ConditionTest for a NULL value
IS NOT NULL ConditionTest for a NOT NULL value
BETWEEN ConditionRetrieve within a range (inclusive)
EXISTS ConditionCondition is met if subquery returns at least one row

MariaDB Tables and Views

CREATE TABLECreate a table
CREATE TABLE ASCreate a table from another table's definition and data
ALTER TABLEAdd, modify, delete columns in a table; rename a table
DROP TABLEDelete a table
VIEWVirtual tables (views of other tables)

MariaDB Data Types

Data TypesData Types in MariaDB

MariaDB Question and Answer

Question & AnswerVarious questions and answers

No comments:

Post a Comment

MariaDB: Indexes

  MariaDB:   Indexes This MariaDB tutorial explains how to   create, drop, and rename indexes   in MariaDB with syntax and examples. What is...