mysql - Error Code: 1064 on constraint -
create table boat (bid integer not null constraint c_bid primary key, bname varchar(40), color varchar(40) constraint c_color check (color in ('red','blue','light green','yellow')));
i use sql code on script using mysql workbench , word contraint red , error syntax error : unexpected 'constraint' (constraint).
when run script get:
error code: 1064. have error in sql syntax; check manual corresponds mysql server version right syntax use near 'color_c constraint check (color in ('red','blue','light green','yellow')))' @ line 5 0.000 sec
Comments
Post a Comment