SQL Tutorial


      Basics

    1. Introduction
    2. Database Structure

      Commands

    3. Create
    4. Select
    5. Insert
    6. Update
    7. Delete
    8. Drop

      Operations

    9. Joining Tables

      Appendices

    10. Terms
    11. Credits

The CTDP SQL Guide Version 0.2.1 June 9, 2001

Introduction

This SQL Guide is written as a basic introduction to Structured Query Language (SQL).

RDBMS and SQL

Structured Query Language (SQL) is a standard language for communication with a relational database management system (RDBMS). SQL provides commands which are used to create, modify, and access the database. Databases contain one or more tables of data with relationships between multiple tables defined in the database. Each table is an object.

SQL Commands

  • Select - Used to retrieve selected data. Example:

    select "columnname1", "columnname2" from "tablebasename" [where "condition"];

    A "*" may be used to select all columns. The where clause is optional and only one column name must be specified.

  • Insert
  • Update
  • Delete
  • Create
  • Drop