Professional Documents
Culture Documents
Data Manipulation Language 1
Data Manipulation Language 1
The SQL data manipulation language (DML) is used to query and modify database
data. In this chapter, we will describe how to use the SELECT, INSERT, UPDATE,
and DELETE SQL DML command statements, defined below.
SELECT Statement
The SELECT statement, or command, allows the user to extract data from tables,
based on specific criteria. It is processed according to the following sequence:
We can use the SELECT statement to generate an employee phone list from the
Employees table as follows:
SELECT FirstName, LastName, phone
FROM Employees
ORDER BY LastName
This action will display employee’s last name, first name, and phone number from the
Employees table, seen in Table 16.1.
In this next example, we will use a Publishers table (Table 16.2). (You will notice that
Canada is mispelled in the Publisher Country field for Example Publishing and ABC
Publishing. To correct mispelling, use the UPDATE statement to standardize the
country field to Canada – see UPDATE statement later in this chapter.)