Set: SQL: NOT NULL, UNIQUE, PRIMARY KEY

Familiarize

Learn

Test

Play Scatter

Play Space Race

Combine with other sets Login to add to Favorites
Print: Term List | Flashcards Editing not allowed
Export Deleting not allowed

Share these flash cards

With group: None
HTML link to set: Tiny link:
Share on Facebook Share on MySpace

All 11 terms

TermDefinition
NOT NULLenforces a column to NOT accept NULL values or enforces a field to always contain a value
UNIQUEprovide a guarantee for uniqueness for a column or set of columns; constraint uniquely identifies each record in a database table
PRIMARY KEYprovide a guarantee for uniqueness for a column or set of columns; automatically has a UNIQUE constraint defined on it; can only have one
ALTER TABLE table_name ADD UNIQUE column_nameto create a UNIQUE constraint on a column when the table is already created,
ALTER TABLE table_name ADD CONSTRAINT constraint_name UNIQUE (column_name)to allow naming of a UNIQUE constraint, and for defining a UNIQUE constraint on multiple column
ALTER TABLE table_name DROP CONSTRAINT constraint_nameto drop a UNIQUE constraint
ALTER TABLE table_name ADD PRIMARY KEY column_nameto create a PRIMARY KEY constraint on a column when the table is already created,
ALTER TABLE table_name ADD CONSTRAINT constraint_name PRIMARY KEY (column_name)to allow naming of a PRIMARY KEY constraint, and for defining a PRIMARY KEY constraint on multiple column
ALTER TABLE table_name DROP CONSTRAINT primary key__nameto drop a PRIMARY KEY constraint
CREATE TABLE table_name (column_name1, NOT NULL, column_name2, UNIQUE (column_name))to create a table with a UNIQUE constraint on a column
CREATE TABLE table_name (column_name1, NOT NULL, column_name2, PRIMARY KEY (column_name))to create a table with a PRIMARY KEY constraint on a column

Set Information

Terms 11
Creator jtwilliams00
Created March 30, 2009
Groups None
Subject SQL
Access Anyone
Edit Creator Only
Get rid of ads on Quizlet
Pop out

Discuss

No Messages
Last Message: never

You must be logged in to discuss this set.