SQL Server Performance

Have a little issue...

Discussion in 'Getting Started' started by obracer12, May 7, 2011.

  1. obracer12 New Member

    I am learning SQL on my own and a friend of mine took a course in it and I want to try his assignments, but get caught up in the logic...
    Here is the assignment I am trying to do, but am not having any success. :
    . DDL &Constraints
    Create the tentables in the create.sql script inOracle by adding the following constraints belowto the CREATE TABLE statements.
    Constraints:
    Department_id inEmployees refers to department_id in Departments.
    Location_id inDepartments refers to location_id in Locations.
    Location_id incombination with name is unique in Departments.
    Job_id in Employeesrefers to job_id in Jobs.
    Product_id in Pricesrefers to product_id in Products.
    Product_id in itemsrefers to product_id in Products.
    Customer_id inSales_Orders refers to customer_id in Customers.
    Salesperson_id inCustomers refers to employee_id in employees.
    Order_id in Itemsrefers to order_id in Sales_Orders.
    Check that sex inEmployees only contains “M” or “F”.
    The combination offirst_name, middle_initial and last_name in Employees is unique.
    Use the ALTER TABLEcommand to make the hire_date and dob NOT NULL.
    For the life of me I get lost every time. Can some of you guys help me figure this out?
    Thank you
  2. Luis Martin Moderator

    Welcome to the forums!
    "Create the ten tables in the create.sql script in Oracle by adding the following constraints below to the CREATE TABLE statements."
    This is Microsoft SQL SERVER forum.
    Thanks,
  3. Madhivanan Moderator

Share This Page