Updated some insert queries

Make them compliant with the SQL99 standard, instead of using some mysql-ism.