|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am building a DB using mysqlcc and need to define a FK in a table, but can not find information on how to do this.
Obviously this should be simple, but I could use some help... Thanks in advance |
|
#2
|
|||
|
|||
|
I don't know how to do it in mysqlcc's interface, but if you can feed it a straight query, you can use this:
Code:
ALTER TABLE child_table ADD FOREIGN KEY (child_field) REFERENCES parent_table(parent_field) ON DELETE etc. Check the manual for adding ON DELETE and ON UPDATE conditions
__________________
"A pawn is the most important piece on the chessboard -- to a pawn" |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Defining Foreign Key in mysqlcc |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|