| | |
mySQL foreign keys
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
I am trying to create an INNODB table with a foreign key, and it doesnt seem to be working. Can someone give me an example on how to use a foreign key. Here is an example of what i have:
FOREIGN KEY (client_id) REFERENCES CLIENT (client_id)
This line is preventing me from creating the table. It works without this line. Someone please help me
FOREIGN KEY (client_id) REFERENCES CLIENT (client_id)
This line is preventing me from creating the table. It works without this line. Someone please help me
![]() |
Similar Threads
- insert into multiple tables linked by foreign keys (PHP, MySQL) (PHP)
- SQL statement to count foreign keys (MySQL)
- PHP Dynamic Forms (PHP)
- Foreign keys from one table to a parent field (Database Design)
- Lots of Foreign keys...locking? (MySQL)
- Help with composite and Foreign Keys (Database Design)
- DB Design, trying to keep in sync without foreign-keys (Database Design)
- Varchar field as foreign reference (MySQL)
Other Threads in the MySQL Forum
- Previous Thread: libmysqld
- Next Thread: MySQL nested query / joined query conversion help
| Thread Tools | Search this Thread |
1 agplv3 alfresco amazon api artisticlicense aws bizspark breathalyzer camparingtocolumns changingprices cmg communityjournalism contentmanagement contractors copyright court crm data database design developer development distinct dui email enter enterprise error eudora facebook form foss gartner gnu government gpl greenit groupware hiring hyperic images innerjoins insert ip joebrockmeier join keyword keywords kickfire laptop law legal license licensing linux maintenance managing mariadb matchingcolumns metron microsoft microsoftexchange mindtouch montywidenius multiple music mysql mysqlcolumnupdating mysqldatetimeordermax() mysqlindex mysqlinternalqueries mysqlquery mysqlsearch news open-xchange opengovernment opensource operand oracle penelope php priceupdating query referencedesign reorderingcolumns resultset saas select sharepoint simpledb sourcecode spotify sql sugarcrm syntax techsupport thunderbird transparency virtualization





