Skip to content

Informatics Practices · Ch 7 — Introduction to Structured Query Language (SQL)

SQL for Data Manipulation

7.5

SQL for Data Manipulation

The CREATE statements of the previous section built the database StudentAttendance with its three relations — STUDENT, GUARDIAN and ATTENDANCE. But creating a table brings only its structure into existence: the columns, their data types and their constraints. The table itself contains no data at that point.

Filling and maintaining the data is the job of SQL's data manipulation statements:

  • To populate records in a table, the INSERT statement is used.
  • Records in a table can likewise be deleted or updated using SQL data manipulation statements.

Data manipulation using a database means any of four operations:

  1. Retrieval (access) of existing data,
  2. Insertion of new data,
  3. Removal of existing data,
  4. Modification of existing data in the database. …