Jump to content

Error #1064 with query


advancedfuture

Recommended Posts

I am trying to run a query on my database to delete all entries that have duplicate cities and only leave on city. But I keep getting an error:

 

My query:  DELETE FROM zip_code WHERE COUNT( city ) >1 GROUP BY city 

 

The error I keep getting:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY city' at line 1

 

What is wrong with my query? Any help would be much appreciated

Link to comment
https://forums.phpfreaks.com/topic/131588-error-1064-with-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.