Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    14

    Question Unanswered: Forward engineer from Erwin

    I have a table in one schema RESULTS that need to reference an id (PK) in a table T_User in schema MAIN. So SQL is as follows:

    GRANT REFERENCES ON TABLE T_User TO RESULTS;

    So for table T_Result in RESULTS I want to reference T_User in MAIN:

    ALTER TABLE T_Result
    ADD ( CONSTRAINT R_73
    FOREIGN KEY (userid)
    REFERENCES MAIN.T_User ) ;

    (Correct syntax??)

    But how do I define this in Erwin (4.0), so I can forward engineer the lot ??

    TIA
    /Rob
    "It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    The syntax would be

    ALTER TABLE results.t_result
    ADD CONSTRAINT r_73
    FOREIGN KEY (userid)
    REFERENCES main.t_user (userid);

    But, I don't know how to do this in Erwin ...

Posting Permissions

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