fix coding style, delete sql code