Subject Re: [firebird-support] REPLACE command
Author Martijn Tonies
> > You know - I bet I know why MySQL has a REPLACE... As it doesn't have
> > FKs, it doesn't have cascading delete FKs and you can easily delete a
> > row. With Firebird, however, you would "replace" the row, but you would
> > into problems with FKs.
> >
> > Another - I think better - command would be:
> >
> :)
> I would rather see UPDATE_OR_INSERT command.
> If you try to update the record that doesn't exists (no PK), the db
> would create new one (using entered PK value and defaults for all other
> columns). I have come to need something like this every now and then,
> but some SP or few lines of code do the job well.
> IMHO, there are other, *much* more important things for FB development
> team to "waste" their time with.

Oh yes - I fully agree.

btw, Database Workbench let's you (automatically) create an INSERTUPDATE
procedure that tries to insert with the specified PK and updates if a PK
happens... No need to write any code :-)

With regards,

Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions