sql updated according to latest standards