phpmyadmin - Creating a table in Mysql with phpadmin -
i keep getting errors when trying create products table database i'm building.
here code i've tried:
create table products ( productid int not null auto_increment primary key, name varchar(255) not null, price decimal(19, 4), on_hand integer, supp_id int, foreign key (supp_id) references suppliers(supp_id) ); i getting error code:
#1005 - can't create table 'computer_wholesale.products' (errno: 150
any appreciated.
i believe suppliers table missing index, required use foreign key with.
Comments
Post a Comment