crazywolf2010
asked on
MySQL Table update returning error
Hi,
I am using following SQL
update email a, contact b
set a.email = CONCAT('abcd+' ,b.first_name,', ',b.last_name, '@gmail.com')
where a.contact_id=b.id
I have an error
#1442 - Can't update table 'contact' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
There are no triggers on the table.
Thanks
I am using following SQL
update email a, contact b
set a.email = CONCAT('abcd+' ,b.first_name,', ',b.last_name, '@gmail.com')
where a.contact_id=b.id
I have an error
#1442 - Can't update table 'contact' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
There are no triggers on the table.
Thanks
Is this a stored function? If so, check the SQL code that calls this function and make sure "contact" is not already used as an alias in there within the same session.
ASKER
Hi,
This is not stored function at all. I am running it under phpmyadmin.
Thanks
This is not stored function at all. I am running it under phpmyadmin.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Exact same error
What is the scenario I don't understand your question are you updating using two tables ?? can you post image for your table??
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.