Although I use mySQL (for now), I don't want any specific SQL code.
I am trying to insert a record if it does not exist and update the field if it exists. I want to use ANSI SQL.
The table looks something like this:
create table test_table (id int, name varchar(16), weight double) ; //test data insert into test_table (id, name, weight) values(1,'homer', 900); insert into test_table (id, name, weight) values(2,'marge', 85); insert into test_table (id, name, weight) values(3,'bart', 25); insert into test_table (id, name, weight) values(4,'lisa', 15); If the record exists, I want to update the weight (increase by say 10)
sql
morpheous
source share