Primary Key & ID
Monday, July 9th, 2007 135 views | Posted in phpMyAdmin | No Comments
A primary key is used to uniquely identify each row in a table. It can either be part of the actual record itself, or it can be an artificial field (one that has nothing to do with the actual record). A primary key can consist of one or more fields on a table. When multiple fields are used as a primary key, they are called a composite key.
Primary keys can be specified either when the table is created (using CREATE TABLE) or by changing the existing table structure (using ALTER TABLE).
CREATE TABLE Customer
(SID integer,
Last_Name varchar(30),
First_Name varchar(30),
PRIMARY KEY (SID));
Tags: PHP
Posted in: phpMyAdmin
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment
Posted in: phpMyAdmin
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment



































