InformIT Visual Tutorial 3: Structured Query Language (SQL)
You and your programs can communicate with your database using a language known as Structured Query Language (SQL) for short. In this tutorial, we show you how to store information in the database and retrieve it from the database via SQL commands.
After completing this tutorial you should be able to do the following:
Explain why you need to know SQL
Write SELECT queries
Write INSERT queries
Explain how the DELETE and UPDATE queries work
In Visual Jumpstart Tutorial 2, you learned how to create a table in a database and how to manually enter information into this table and open the table to view its contents. But a computer program doesn't have hands and eyes, so it can't enter or view information in the database the same way you do. Instead, a program must communicate with the database using a special language known as Structured Query Language (SQL). Since you're going to write code—Active Server Pages scripts—that communicates with the database, you also have to know how to work with SQL. This tutorial covers the basic SQL you need to know to store data in and retrieve information from the database (see Figure 1). We also briefly cover more advanced queries for deleting and updating information in the database.
Figure 1 What's covered in this tutorial (SQL).
The acronym SQL can be pronounced in several ways. You can read off the individual letters (S-Q-L) or say it as a word: sequel. Some people even say squeal! For purposes of this tutorial, we'll assume it's pronounced sequel.