CS60 script creates 4 tables with initials LFM.sql

CS60 script creates 4 tables with initials LFM.sql - CS60...

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

View Full Document Right Arrow Icon
/* CS60 script creates 4 tables with initials LFM.SQL version 1-DEC-2015 by Harold Rogler The following SQL commands drop then create the four tables on Page 5 of CS65 Chapter 01 and inserts values into the tables. Please copy this file and replace the 4 characters LFM_ with LFM_ where LFM are the Last, First, Middle initials of your names and _ is the underscore. Creating tables and other objects with your initials beginning their names will create unique names in the shared database, and will group your objects together in the object browser. */ SET ECHO ON; --The following two SQL Plus commands can be omitted --SET PAGESIZE 100; --SET LINESIZE 200; /* If your tables don't exist, the following drop commands will cause errors, but don't worry about these errors. If your tables exist, they'll be dropped. */ DROP TABLE LFM_Invoice; DROP TABLE LFM_Customer; DROP TABLE LFM_Inventory; DROP TABLE LFM_Representative; CREATE TABLE LFM_Representative ( Representative_ID char(2), Last_Name varchar2(20) NOT NULL, First_Name varchar2(20), Region char(2), Hire_Date date, Phone varchar2(14), constraint PK_LFM_Representative Primary Key (Representative_ID), constraint CK_LFM_Representative CHECK(Region IN ('NE', 'NW', 'MW', 'SE', 'SW')) ); CREATE TABLE LFM_Inventory ( Item_Number char(2), Description varchar2(50), Quantity_On_Hand number(4) NOT NULL, constraint PK_LFM_Inventory Primary Key (Item_Number) );
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern