Results 1 to 2 of 2

Thread: create table troubles

  1. #1
    Join Date
    Nov 2002
    Posts
    1

    create table troubles

    wats wrong with this i keep getting syntax error

    CREATE TABLE address2 (
    respondent_id INTEGER NOT NULL UNIQUE,
    address_type TEXT(20) NOT NULL,
    street_number INTEGER NOT NULL,
    street_name TEXT(20) NOT NULL,
    suburb TEXT(20) NOT NULL,
    state TEXT(3) NOT NULL,
    PRIMARY KEY(respondent_id, address_type),
    FOREIGN KEY (respondent_id) REFERENCES respondent (respondent_id),
    FOREIGN KEY (suburb, state) REFERENCES postcode (suburb, state)
    ON DELETE CASCADE
    ON UPDATE RESTRICT);

    thankyou

  2. #2
    Join Date
    Nov 2002
    Location
    Berlin, Germany
    Posts
    3
    I think you should try it without

    ON DELETE CASCADE
    ON UPDATE RESTRICT

    now it should work.

Posting Permissions

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