× Didn't find what you were looking for? Ask a question
  
  
  
Top Posters
Since Sunday
29
24
21
20
19
19
18
18
18
17
17
17
New Topic  
wrote...
Posts: 108
2 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 4 times
1 Reply
Related Topics
Replies
wrote...
2 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
  149 People Browsing
Your Opinion
In one word, how would you rate our website?
Votes: 85

Previous poll results: What's your favorite coffee beverage?
Related Images
 1443
 67
 62