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
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
MariaDB Next Steps
Index

Filtering and searching data


In a table with lots of rows, we will probably want to restrict the number of rows that we retrieve. We can do this using one or more WHERE clauses. When filtering, we can use either full and exact column values or partial values.

Filtering by exact values

When filtering by exact values, we use the full value of a column. For example, a WHERE clause to retrieve data about everyone born on or after January 1, 1970 is given as follows:

WHERE birthday >= '1970-01-01'

The output will look similar to the following:

MariaDB [test]> SELECT * FROM employees 
    -> WHERE birthday >= '1970-01-01'; 
+----+----------------+---------------+-----------+------------+ 
| id | surname        | givenname     | pref_name | birthday   | 
+----+----------------+---------------+-----------+------------+ 
|  1 | Perry          | Lowell Tom    | Tom       | 1988-08-05 | 
|  2 | Pratt          | Parley        | NULL      | 1975-04-12 | 
|  7 | Smith          | George Albert...