update sql database with created and updated rows