2

How can i delete duplicate rows in my database name ( VB) included 255 tables using ALTER TABLE in PHP my admin ?

1

1 Answer 1

0

You can try to add unique index like this:

ALTER IGNORE TABLE tablename ADD UNIQUE INDEX idx_name (columnname1,columnname2 );

This query will drop all the duplicate rows from your table and it will also restrict users to add duplicate rows in future in the table.

Sign up to request clarification or add additional context in comments.

3 Comments

Error SQL query: ALTER IGNORE TABLE vb ADD UNIQUE INDEX idx_name (columnname1,columnname2 ) MySQL said: Documentation #1146 - La table 'vb.vb' n'existe pas
@MohammadAhmadAlAjouri:- 1. Please translate the error in English. 2. You need to mention the column name present in your table not columnname1 and columnname2. These are examples
*****@p3plcpnl0192 [~]$ mysqldump -u vbok -p --hex-blob --opt --default-character-set=latin1 vbok > new.sql Enter password: mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table post at row: 63755 wwwowtjo@p3plcpnl0192 [~]$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.