1
 create table employee
-> (
-> emp_id int(6) NOT NULL AUTO_INCREMENT,
-> full_name varchar(50),
-> dob date,
-> job_dep varchar(50),
-> email_id varchar(50),
-> cont_no int(10),
-> add varchar(50),
-> emp_img longblob NOT NULL,/*for passport size image*/
-> a_img longblob NOT NULL,/*for adhar image*/
-> primary key(emp_id)
-> );

while creating this table showing error in wamp's mysql console:-

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'add varchar(50), emp_img longblob NOT NULL, a_img longblob NOT NULL, primary key' at line 9

1 Answers1

0

ADD is a reserved MySQL keyword and thus cannot be used as column name unless escaped with backticks as per this answer.

orhtej2
  • 2,133
  • 3
  • 16
  • 26