Teburin mai amfani yana da bayanai guda 5 tare da kwafin imel ɗin [email protected]
Mataki 1. Ƙirƙiri sabon tebur wanda tsarinsa yayi daidai da tebur na asali:
CREATE TABLE user_copy LIKE users
Mataki 2. Saka fitattun layuka daga tebur na asali zuwa sabon tebur:
INSERT INTO user_copy SELECT * FROM users GROUP BY email
Mataki na 3. sauke tebirin na asali kuma sake suna tebirin nan da nan zuwa na asali
DROP TABLE users;
ALTER TABLE user_copy RENAME TO users;
Sakamako