Reputation: 1029
if I were doing it:
update p set te = concat('Ez itt a(z) ',xxxx,' tájtl');
it would work OK, but xxxx is "key" now, so:
update p set te= concat('Ez itt a(z) ',key,' tájtl');
so I cant do that. How to fix it? Renaming that column is not an option
Upvotes: 0
Views: 70
Reputation: 10246
update p set te= concat('Ez itt a(z) ', `table_name`.`key`,' tájtl');
Upvotes: 1
Reputation: 57593
In MySQL, every reserved word must be eclosed in backticks:
UPDATE p SET te = CONCAT('Ez itt a(z) ', `key`, ' tájtl');
Upvotes: 3
Reputation: 14411
In MySQL, you have to put the column name in backticks ( ` symbols )
update p set te = concat('Ez itt a(z) ', `key`, ' tájtl');
Upvotes: 3