SQLite’s goal

1) Find the duplicate records and classify them into a new table. max(id) is the record you want to delete

create table ttt as select gallery_url ,max(id) as< /span> theid from gallery group by gallery_url having count(*) >=2

2) Delete

delete  from gallery where id in (sel ect theid from ttt)

create table ttt as select gallery_url ,max(id) as theid from gallery group by  gallery_url having count(*) >=2< /pre>

delete from gallery where id in (select theid from ttt)

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 883 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.