how to create table which has a column from another table in mySQL

Posted by Dexter on Server Fault See other posts from Server Fault or by Dexter
Published on 2010-04-12T06:07:30Z Indexed on 2010/04/12 6:13 UTC
Read the original article Hit count: 237

Filed under:
|

i want to create a table :

products

which looks like (these are columns name)

Id Name Category-id Description

now Category-id column gets the values from another table

category

which looks like

Id Name Description

now category.Id is used in products.Category-id

how to do this in mySQL

© Server Fault or respective owner

Related posts about mysql

Related posts about foreign-key