Please help I'm pretty noob at this and I don't know how I should put the foreign key If anybody can help, I'll appreciate it!
mysql>
create table Evento
(idEven int NOT NULL auto_increment,
denominacion varchar(20),
horaInicio time,
idLugar int,
cupo int,
constraint PK_Evento primary key (idEven));
Query OK, 0 rows affected
mysql>
create table Lugar
(idLugar int NOT NULL,
nombre varchar(20),
direccion varchar(20),
localidad varchar(20),
constraint PK_Lugar primary key (idLugar),
constraint FK_Lugar foreign key (idLugar) references Evento(idLugar));
ERROR 1215 (HY000): Cannot add foreign key constraint