It's not always better to squander space: doing so may result in the program not working at all. Squandering time just makes it run slowly. But that's more of a philosophical point.
WRT the update_unless_insrt: there isn't such an option: PrincePawn's referring to the sort of situation where you've got enough information to create a record from scratch, or replace an existing one.
Thus (under Oracle) you get code similar to:
. id would presumably be limited to the primary key, rather than any unique key. Personally, I think I'd prefer to see it as inserting if the update fails (which avoids the problem of duplicating a different column).BEGIN INSERT INTO mytab (id, ...) VALUES (id_value, ...); EXCEPTION WHEN DUP_VAL THEN UPDATE mytab SET .. = ... WHERE id=id_value; END;
In reply to Re: Re: EZDBI is an easier interface to SQL databases
by tommyw
in thread EZDBI is an easier interface to SQL databases
by Dominus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |