You need to tell SQL which table the foreign key refers to:
EMP_ID int NOT NULL foreign key REFERENCES empDetails,
BTW, the would be a good idea to declare both keys to be the same size - if you explicitly state
int(11)
for one, your should also use
int(11)
for the foreign key rather than just
int