how to set Foreign Key in database?

Certified Associate Developer

how to set Foreign Key in database? mariadb

  Discussion posts and replies are publicly visible

Top Replies

Parents Reply
  • 0
    Certified Associate Developer
    in reply to krishnav9816

    this is second try

    Error

    SQL query: Copy

    ALTER TABLE LMS_Aprrovals
    ADD CONSTRAINT fk_claimtype,
    ADD FOREIGN KEY (Claim ID) REFERENCES lmscustomerdetails(id);
    

    MySQL said: 

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '
    ADD FOREIGN KEY (Claim ID) REFERENCES lmscustomerdetails(id)' at line 2
Children