× Didn't find what you were looking for? Ask a question
  
  
  
  
Top Posters
Since Sunday
29
11
10
9
8
7
7
7
7
6
6
6
New Topic  
wrote...
Posts: 190
4 months ago
Explain the essential format of the CREATE TABLE statement. Include an example.
Source  Download
Database Processing: Fundamentals, Design, and Implementation
Edition: 15th
Authors:
Read 16 times
1 Reply
Related Topics
Replies
wrote...
4 months ago
The essential format for the CREATE TABLE statement is:
CREATE TABLE tablename (
column-description,
column-description,
column-description,
. . .
optional table constraints
);
"Tablename" is the name that will be given to the newly created table. "Column-description" is a three-part description of each column to appear in the table. This description includes the name of the column, the column's data type, and an optional column constraint (either Primary Key, Null, or Not Null), in that order. The CONSTRAINT phrase can be used to set optional primary key, foreign key and referential integrity constraints for the table. All SQL statements must end with a semi-colon (;). Here is an example:
CREATE TABLE VEHICLE (
VIN CHAR(32),
Year INTEGER,
Make CHAR(25) NOT NULL,
CONSTRAINT VEHICLE_PK PRIMARY KEY (VIN)
);
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers.
Learn More
Improve Grades
Help Others
Save Time
Accessible 24/7
  157 People Browsing
Your Opinion

Previous poll results: Do you believe in global warming?
Related Images
 123
 141
 100

▶️ Video: Alzheimer's Disease

For a complete list of videos, visit our video library