+ 12

distinct command delete duplicate data?

11th Sep 2016, 5:44 AM
Saurav Saini
Saurav Saini - avatar
4 Respostas
+ 2
no.. distinct will not delete data.. it will just displays the results without duplicate values
11th Sep 2016, 3:37 PM
sangamesh naikar
sangamesh naikar - avatar
+ 1
no..distinct is used with select statement If you are using SQL Server, you could use DELETE TOP 1. Ex: Suppose you have a table that Does Not have a primary key: id name --------------- 1 Tiger 2 Cat 1 Tiger 4 Monkey 2 Cat ----------------- DELETE TOP 1 FROM table1 WHERE id IN (SELECT id FROM table1 GROUP BY id HAVING COUNT (*)>1);
11th Sep 2016, 7:40 AM
Tiger
Tiger - avatar
0
it doesn't delete..it just fetches unique records only by ignoring duplicate records!
3rd Nov 2016, 11:52 AM
Banty
Banty - avatar
0
no borra nada
14th Sep 2017, 12:34 AM
Daniel Molina
Daniel Molina - avatar