sql - Syntax error creating table in MySQL database -
i'm getting syntax error when i'm trying create table in mysql database, around mediumblob, can me?
create table `elo`.`images` ( `image_id` varchar( 50 ) not null , `user_id` varchar( 50 ) not null , `image` mediumblob(16777215) not null , `longitude` varchar( 15 ) not null , `latitude` varchar( 15 ) not null , `city` varchar( 50 ) not null , `delete_at` datetime not null , `description` varchar( 250 ) not null , `score` int( 8 ) not null default '0', `categories` set( 'nightlife', 'food', 'beach' ) not null default 'nightlife', primary key ( `image_id` ) , unique ( `image` ) ) engine = myisam
you can't set length mediumblob
column should defined image mediumblob not null,
means can't set unique
don't have length sql should this
create table `images` ( `image_id` varchar( 50 ) not null , `user_id` varchar( 50 ) not null , `image` mediumblob not null, `longitude` varchar( 15 ) not null , `latitude` varchar( 15 ) not null , `city` varchar( 50 ) not null , `delete_at` datetime not null , `description` varchar( 250 ) not null , `score` int( 8 ) not null default '0', `categories` set( 'nightlife', 'food', 'beach' ) not null default 'nightlife', primary key ( `image_id` ) ) engine = myisam
Comments
Post a Comment