O'Reilly logo

Special Edition Using Microsoft® Visual Basic® .NET by Jeff Spotts, Brian Siler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required