I have the following table with a name information.

As you see in the previous table a column with a name number, this column has many duplicate values.
I want if the row repeats, update its cell tabto 1, otherwise leave it as 0.
The following is what I did.
$query = mysql_query("UPDATE information SET tab='1' WHERE number = (SELECT distinct number FROM information)");
source
share