Does MySQL support foreign key?

Tags:
Foreign keys
MySQL
WAMP server
In WAMP server when you create table there is no option for foreign key.


Software/Hardware used:
WAMP server
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

I think this is what you are looking for.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • AshishSingh10

    Hi,

    Yes MYSQL supports foreign key constraints, which provide the knowledge about cross reference related data in the  table of the database. Foregin key is the field of one table which uniquely identify a row of another table. The syntax of foregin key generally used during the creation of table or altering of the table.

    Example:-

    [CONSRAINT[symbol]] FOREIGN KEY

    [index name](index_col_name, …)

    REFERENCES tbl_name (index_col_name, …)

    [ON DELETE reference_option]

    [ON UPDATE reference_option]

    Thanks  & Regards

    Ashish@S

    1,330 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: