Using SQL Action Statements

As you have seen, the SELECT statement is used for returning records from a database. However, there are several other types of SQL statements, known as action queries, that do not return records. These queries, listed next, just manipulate data in the database:

  • DELETE FROM— An action query that removes records from a table

  • INSERT INTO— An action query that adds records to a table

  • UPDATE— An action query that sets the values of fields in a table

As you will see in the following sections, action queries work very similarly to SELECT statements in that you can join tables and specify a WHERE clause.

Using the DELETE Statement

The DELETE statement’s purpose is to delete specific records from a table. You specify the ...

Get Special Edition Using Microsoft® Visual Basic® .NET 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.