OVCTables.sql - -This script will drop created tables...

This preview shows page 1 - 2 out of 3 pages.

--This script will drop created tables first --This script will then create tables for OVC database --Then this script will insert data into those tables set echo on spool on spool OVCTables.txt DROP TABLE customers CASCADE CONSTRAINTS; DROP TABLE sales CASCADE CONSTRAINTS; DROP TABLE vehicles CASCADE CONSTRAINTS; CREATE TABLE customers (cust_ID number(10,0), firstname varchar2(20)NOT NULL, lastname varchar2(20)NOT NULL, address number(10,0)NOT NULL, street varchar2(20)NOT NULL, city varchar2(20) NOT NULL, state varchar2(2) NOT NULL, zip number(5,0)NOT NULL, phone number(10), CONSTRAINT customers_cust_ID_pk PRIMARY KEY(cust_ID)); CREATE TABLE vehicles (VIN varchar2(12), make varchar2(20)NOT NULL, model varchar2(20)NOT NULL, type varchar2(20)NOT NULL, year number(4)NOT NULL, wholesale_cost varchar2(10)NOT NULL, CONSTRAINT vehicles_VIN_pk PRIMARY KEY(VIN)); CREATE TABLE sales (sale_ID number(10,0), cust_ID number(10,0)NOT NULL, sale_date date NOT NULL, gross_sale_price varchar2(10)NOT NULL, mileage varchar2(6)NOT NULL, VIN varchar2(20)NOT NULL,

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture