When I try to set a foreign key, it throws error number 150.
Schema creation failed: table can not create 'db_2_f856e.urlnames'
This code is:
table images Create (url_id_no int (250), url varchar (250), create urlnames (id int auto_increment primary key, gender varchar (6), pattern varchar (50), item_name varchar (25), url_id int (250) Foreign key (url_id_no) reference images (
Your data structure does not mean I think you Wish:
create table urlnames (url_id_no int auto_increment Pvt Mik key, url varchar (250); Create table images (image_id int auto_increment primary key, gender varchar (6), pattern varchar (50), item_name varchar (25), url_id int (250) reference urlnames (url_id_no));
Any column referenced by the foreign key reference is required to be the primary key or the unique key.
is a SQL BALLED example.
Comments
Post a Comment