Table column with keyword as name
Hello,
we have a 3th party software running and want to update data in a table.
But this fails cause one columen is named "primary".
insert into entity_phone_number (entity_id,phone_number_id,entity_type,primary) values
(102097,10209704642915510,'Account',1),(102098,1020980407459130,'Account',1)
on duplicate key update entity_id=values(entity_id),phone_number_id=values(phone_number_id),entity_type=values(entity_type),primary=values(primary)
gives
#1064 - 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 'primary) values
(102097,10209704642915510,'Account',1),(102098,1020980407459130' at line 1
I cant change the column name, how can i slove this?
Server version: 5.7.22 - MySQL Community Server (GPL)
Sincerly