I have an mnesia table with three fields, i, a and b, created using the record
-record(rec, {i, a,b}).
Now I insert a row into the table as:
mnesia:transaction( fun() -> mnesia:write("T", #rec{i=1, a=2, b=3}, write) end ).
Now what do I do if I want to update this row, and change only the value of a to 10, while leaving i and b with the same values? Is there any SQL equivalent like "UPDATE T SET a=10 WHERE i=1
"?
If I do something like this:
mnesia:transaction( fun() -> mnesia:write("T", #rec{i=1, a=10}, write) end )
The row is stored as:
{rec,1,10,undefined}