0

I am using Server version: 5.6.26 MySQL Community Server (GPL).I am trying to insert into subodh table using & operator using following query

insert into subodh values(&date_of_birth,&name,&age,&qualification,&id);

but it is showing the following error

 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 '&date
_of_birth,&name,&age,&qualification,&id)' at line 1 

please help me.

Thanks

  • & is a special character. You can try to enter field names between back ticks. Please take a look here: http://stackoverflow.com/questions/10443050/special-characters-in-mysql-table-name – hypnos Dec 10 '16 at 12:38
  • are you trying to make an insert with substitution variables like in Oracle? If yes, this is not possible in MySQL. Your application should manage the variables – Thomas G Dec 10 '16 at 12:39
  • if you're using a client side language (php?, Java? C#? other?) please [edit] your question tags to let us know which one. This kind of variable substitution is performed by the client side language in MySQL. – O. Jones Dec 10 '16 at 12:55

0 Answers0