Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2011

    Red face Unanswered: error: 150 please help!!

    im building up this database for my [homework] application and i keep gettting the 'error:150', i know it has to do with the way the foreign key is formed, I can't see what the problem is though:

    CREATE TABLE shift(
    shiftID INT NOT NULL,
    shift_date DATE NOT NULL,
    start_time TIME NOT NULL,
    end_time TIME NOT NULL,
    PRIMARY KEY (shiftID, shift_date, start_time, end_time)

    CREATE TABLE shift_day(
    shift_date DATE,
    dayOfWeek VARCHAR(10),
    PRIMARY KEY(shift_date),
    FOREIGN KEY(shift_date) REFERENCES shift(shift_date)

  2. #2
    Join Date
    Apr 2011


    its alright guys, i sussed it, my own stupidity again!!

    my normalisation was gack as usual!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts