Added insert into statements to all queries