Clear SQL query in mysql core