Chapter 18. Loading and Unloading Data

18.1 Introduction

All SQL statements use data that is stored in tables of a database. However, sometimes we want to take the data out of the database and store it in an output file. Other programs that do not support SQL then can process this file. This process is called unloading data.

The opposite of loading data is, obviously, loading data. Here, data stored in files is added to the database. These files are created by another program or supplied by a company, for example. Usually, this file is called the input file.

Loading and unloading data can also transfer data from one MySQL database to another. For example, this can be useful if we want to build a second version of the database somewhere else. ...

Get SQL for MySQL Developers: A Comprehensive Tutorial and Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.