Subject Re: [Firebird-Architect] Replace the statement REPLACE
Author Martijn Tonies
Dimitry,

> >favor the keyword REPLACE. Yes, MySQL has a REPLACE statement with
> >approximately (?) the same syntax, but the MySQL statement is
> >completely screwed up and works badly, if at all, with triggers or
> >foreign keys. Having Firebird do it right will making fixing MySQL
> >easier (believe it or not).
>
> Second that. I'd leave it as it is, and when somebody complains -
> send them to press MySQL to fix their mistake.
> If MySQL indeed don't have FK cascade and triggers - there is no
> issue.

MySQL DOES have triggers and FK cascade, so there is an issue.

There REPLACE statement is documented as "delete and then insert".

They have another statement that does the simple MERGE.


No doubt, they couldn't care less and say that their replace is to
documented
to work as such, annoying as it is.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com