IST210 LAB3 - 1 CREATE TABLE Customer CustomerNo NUMERIC(6 CustomerName VARCHAR(30 City VARCHAR(30 State VARCHAR(2 Region_id CHAR(6 Command(s

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1. CREATE TABLE Customer ( CustomerNo NUMERIC ( 6 ) NOT NULL, CustomerName VARCHAR ( 30 ), City VARCHAR ( 30 ), State VARCHAR ( 2 ), Region_id CHAR ( 6 ), ); Command(s) completed successfully. CREATE TABLE Region ( Region_id CHAR ( 6 ) NOT NULL, Region_desc VARCHAR ( 20 ) ); Command(s) completed successfully. CREATE TABLE OrderLine ( ProductID VARCHAR ( 12 ) NOT NULL, OrderNo NUMERIC ( 10 ) NOT NULL, Qty NUMERIC ( 8 ), UnitPrice NUMERIC ( 8 , 2 ), ShipDate DATETIME ); Command(s) completed successfully. CREATE TABLE Product ( ProductID VARCHAR ( 12 ) NOT NULL, Description VARCHAR ( 20 ), ListPrice NUMERIC ( 8 , 2 ) ); Command(s) completed successfully. CREATE TABLE Orders ( OrderNo NUMERIC ( 10 ) NOT NULL, CustomerNo NUMERIC ( 6 ) NOT NULL, OrderDate DATETIME ); Command(s) completed successfully. 2. ALTER TABLE Customer ADD CONSTRAINT pk_name PRIMARY KEY ( CustomerNo ); Command(s) completed successfully. ALTER
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/02/2009 for the course IST 210 taught by Professor Mcconn,charlotteryoo,jungwoo during the Summer '08 term at Pennsylvania State University, University Park.

Page1 / 3

IST210 LAB3 - 1 CREATE TABLE Customer CustomerNo NUMERIC(6 CustomerName VARCHAR(30 City VARCHAR(30 State VARCHAR(2 Region_id CHAR(6 Command(s

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online