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
I think what you need is called a VIEW in SQL parlance. That is, a virtual table, created dynamically based on a SELECT statement. I would do it like this: