Delete duplicate records from mysql table
Posted: Mon Dec 01, 2008 10:03 pm
Hi guys,
I have a problem with deleting duplicate records from mysql table, mysql version is above 5
DELETE FROM `tbl_video_category` WHERE category_id NOT IN (
SELECT MAX( category_id )
FROM `tbl_video_category`
GROUP BY category_name )
Error message showing that 'You can't specify target table 'tbl_video_category' for update in FROM clause'
Any help would be appreciated
Thanks.
I have a problem with deleting duplicate records from mysql table, mysql version is above 5
DELETE FROM `tbl_video_category` WHERE category_id NOT IN (
SELECT MAX( category_id )
FROM `tbl_video_category`
GROUP BY category_name )
Error message showing that 'You can't specify target table 'tbl_video_category' for update in FROM clause'
Any help would be appreciated
Thanks.