Fix syntax errors in SQL statements.