minor update to sql write

it didn't facilitate update by allowing autoincrement to have a preset
value.