Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
SQL Basics

SQL Basics

Ratings: (0)|Views: 3 |Likes:

More info:

Published by: Nagendra Venkat Thati on Nov 11, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/04/2012

pdf

text

original

 
Copyright ©2004 Pearson Education, Inc.
Chapter 8
SQL-99: SchemaDefinition, BasicConstraints, and Queries
 
Slide 8-2
Elmasri and Navathe, Fundamentals of Database Systems,
Fourth Edition 
Copyright ©2004Ramez Elmasriand Shamkant Navathe
Data Definition, Constraints,and Schema Changes
z
Used to CREATE, DROP, and ALTER thedescriptions of the tables (relations) of adatabase
 
Slide 8-3
Elmasri and Navathe, Fundamentals of Database Systems,
Fourth Edition 
Copyright ©2004Ramez Elmasriand Shamkant Navathe
CREATE TABLE
z
Specifies a new base relation by giving it a name,and specifying each of its attributes and their datatypes (INTEGER, FLOAT, DECIMAL(i,j),CHAR(n), VARCHAR(n))
z
A constraint NOT NULL may be specified on anattribute
CREATE TABLE DEPARTMENT(DNAMEVARCHAR(10)NOT NULL,DNUMBERINTEGERNOT NULL,MGRSSNCHAR(9),MGRSTARTDATECHAR(9) );

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->