MySql - only update some rows if the table exists - do not want an error thrown
- by Pete Oakey
I want to run an update query.
The query will be run against multiple databases - not every database will have the table.
I don't want the update to be attempted if the table does not exist. I don't want any error to be thrown - I just want the update to be ignored.
Any ideas?
EDIT: just to be clear - the query is executed in an automated deployment - no human interaction possible.
EDIT2: the logic to say whether the update should run or not will need to be in the MySql query itself. This is not being run through a command prompt or batch or managed code.