Book Image

Getting Started with MariaDB

By : Daniel Bartholomew
Book Image

Getting Started with MariaDB

By: Daniel Bartholomew

Overview of this book

MariaDB is a database that has become very popular in the few short years that it has been around. It does not require a big server or expensive support contract. It is also powerful enough to be the database of choice for some of the biggest and most popular websites in the world, taking full advantage of the latest computing hardware available. From installing and configuring through basic usage and maintenance, each chapter in this revised and expanded guide leads on sequentially and logically from the one before it, introducing topics in their natural order so you learn what you need, when you need it. The book is based on the latest release of MariaDB and covers all the latest features and functions. By the end of this beginner-friendly book, not only will you have a running installation of MariaDB, but you will have practical, hands-on experience in the basics of how to install, configure, administer, use, and maintain it.
Table of Contents (16 chapters)
Getting Started with MariaDB Second Edition
About the Author
About the Reviewers
MariaDB Next Steps

Retrieving data

The command for retrieving or reading data from our database is called SELECT. Of all the SQL commands, this is the one which we will probably use most often. The syntax is rather complex, or can be, if we choose to use all the various options. However, the basic syntax is quite simple and is as follows:

SELECT <what> FROM <table_name>
    [WHERE <where-conditions>]
    [ORDER BY <column_name>];

In the <what> part, we specify the columns that we want to retrieve data from. The WHERE and ORDER BY lines are how we filter and sort our data, respectively.


Complete documentation of the SELECT command, refer to the following location:

Retrieving everything

A common <what> condition is to specify every column. This is done using an asterisk (*). For example, to retrieve everything from our employees table, we could do the following:

SELECT * FROM employees;

Because we have not specified a WHERE clause, everything...