SQL Queries

<< Click to Display Table of Contents >>

Navigation:  Additional References > Database Primer >

SQL Queries

Previous pageReturn to chapter overviewNext page

 

 

With SQL, we can query a database and have a result set returned. A query like

 

SELECT LastName FROM Persons

 

Gives a result set like this:

 

Last Name

Smith

Wayman

Johnson

 

SQL has 3 statements types that enable data manipulation - the Insert, Update and Delete SQL statements. The Insert SQL statement allows new data to be added into a database table; the Update SQL statement allows existing data to be updated; and the Delete SQL statement instructs the database to delete selected records.