>>>>> "Scott" == Scott Hess <scott@stripped> writes:
Scott> How about just keeping the exact current REPLACE syntax, and add "NODELETE"
Scott> or something (REPLACE NODELETE ...). The syntax you describe looks like it
Scott> has two places to put column and value names, meaning that you could say
Scott> things like "If row exists, insert this set of values, otherwise insert
Scott> some other set of values." I'd rather that you only specified the
Scott> column/value pairs once - if the row exists, overwrite those columns, if it
Scott> doesn't exist, insert it with the default values in the unspecified
Scott> columns.
Scott> Later,
Scott> scott
Hi!
The problem with the above syntax is that its not general enough.
It doesn't handle the cases where you want to have different default
values when you insert a new row or when there is more than one
conflicting row in the result table. In many cases you may also want to
increment something when there is a already a matching row in the
table.
If we added the above, we would still have to add another syntax to
handle the more general cases.
The meaning of replace gets also very 'vague' with REPLACE NODELETE,
its like you are saying 'don't really do a replace'. In this case it
would be better with another keyword or something like
'INSERT OR UPDATE table_name'
Regards,
Monty