mysql> create table invoice_item(inv_id int,pid int,quantity int,foreign key(inv_id) references invoice_master(inv_id),foreign key(pid) references Product(pid)); Query OK, 0 rows affected (0.24 sec) mysql> desc invoice_item; +----------+---------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+---------+------+-----+---------+-------+ | inv_id | int(11) | YES | MUL | NULL | | | pid | int(11) | YES | MUL | NULL | | | quantity | int(11) | YES | | NULL | | +----------+---------+------+-----+---------+-------+ 3 rows in set (0.00 sec)