SQL: Table Structure and Syntax

The Relational Database Management System (RDBMS) is the underlying idea behind SQL. Databases are a collection of like information generally organized into one or more tables. A table will consist of rows and columns. The columns define the type of information, for example addresses, dates, or id numbers. The rows are lines of related data. For example a row might contain a person's name and id number, along with height, weight and eye color. Below is a sample table:

1John Clayton6.2195Hazel
2Jane Porter5.4120Blue
3Paul Darnot5.8160Brown

The structure containing the information is created and manipulated using the Data Definition Language or DDL. This contains commands that create the tables, delete them and structure them. The information within the table itself is accessed using statements and functions under the rubric "Data Management Language or DML. This allows the user to select, delete, add, and manipulate data within the cells of the table.

Although SQL is not case sensitive, statements and functions associated with the Language itself are normally written all in CAPS. This makes it easily distinguishable from parameters and names unique to the database or the data itself.

To comment a line the double-hyphen is used "--". To comment a block begin the block with "/*" and end with "*/".1 Brackets ({...}) may also be used.

< SQL Structured Query Language | AS Keyword Denotes an ALIAS >

  1. How to Enter SQL Comments

Send notes in disappearing ink!

Interesting Pages