At 06:13 PM 2/25/2007, Miles Thompson wrote:

Would someone please check this delete query?

This should delete all rows from the geodesic_user_data that have no match in the subscriber table, but another set of eyes would be appreciated.

DELETE geodesic_user_data
FROM geodesic_user_data
LEFT JOIN subscriber ON geodesic_classifieds_userdata.id=subscriber.GeoClassID
WHERE subscriber.GeoClassID IS NULL;

Our hosting company uses MySQL 4.0.17 so the subquery approach is not possible.

Thanks in advance - Miles

Miles,
        It looks fine but you could have checked it yourself using:

select *
FROM geodesic_user_data
LEFT JOIN subscriber ON geodesic_classifieds_userdata.id=subscriber.GeoClassID
WHERE subscriber.GeoClassID IS NULL;
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to