SQL AUTO INCREMENT Field

The AUTO INCREMENT generates a new number that increment by 1 from the previous number. This will allow a unique number to be associated in a row when it is inserted into a table.

You can set the AUTO INCREMENT during creation of the table or you can also use ALTER TABLE Statement if you have already created the table.

The following example will create a table named "Users" and add a Primary Key with Auto Increment in ID field.

Syntax for SQL Server

Annual Inspection Section (Database System)

Hello... This program entitled "Annual Inspection Section (Database System)" was my 6th uploaded tutorial since i became a member of this site! It was currently used at the "City Government of Makati" Eng'g Dept, and i'm currently working on it 'coz its not finished yet.... Anyway guys.... it has some bugs that i'm trying to fix. Anybody who will help me is my pleasure.. thanks..

SQL ALTER TABLE Statement

The ALTER TABLE statement is used to change the structure of an existing table like adding, deleting, or modifying of column.

SQL ALTER TABLE Syntax

To add a new column to the existing table use the following syntax:
ALTER TABLE table_name ADD column_name datatype

To remove a column from a table use the following syntax:
ALTER TABLE table_name DROP TABLE column_name