March 2016
Beginner
414 pages
9h 29m
English
It took quite a lot of time, but we are finally in the most exciting—and useful—section related to databases: querying data. Querying data refers to asking MySQL to return rows from the specified table and optionally filtering these results by a set of rules. You can also choose to get specific fields instead of the whole row. In order to query data, we will use the SELECT command, as follows:
mysql> SELECT firstname, surname, type FROM customer; +-----------+---------+---------+ | firstname | surname | type | +-----------+---------+---------+ | Han | Solo | premium | | James | Kirk | basic | +-----------+---------+---------+ 2 rows in set (0.00 sec)
One of the simplest ways to query data is to specify the fields of interest after ...
Read now
Unlock full access