Important advice for everyone watching this video: Please don't use the temporary table way to delete duplicates. By any chance, if your session is timed out you will loose all your data(backup). I have seen this happening in live projects. It not a good practice to truncate your main tables either.
Thats what I thought too, even though it is the easier way it does feel reckless to just dump everything without a safe backup. What about creating a new real table with the same attributes, then copying the data to it and only then dropping the original table?
In CTE example, if you delete duplicates in CTE table how come select * from students have no duplicates? Is CTE referencing to students table? And why there is no row number coulmn in students table?
best explanation ever bro. You won't believe I was not understanding this concept untill I saw this video. TYSM bro
Important advice for everyone watching this video: Please don't use the temporary table way to delete duplicates. By any chance, if your session is timed out you will loose all your data(backup). I have seen this happening in live projects. It not a good practice to truncate your main tables either.
Thats what I thought too, even though it is the easier way it does feel reckless to just dump everything without a safe backup. What about creating a new real table with the same attributes, then copying the data to it and only then dropping the original table?
In CTE example, if you delete duplicates in CTE table how come select * from students have no duplicates? Is CTE referencing to students table? And why there is no row number coulmn in students table?
nice explanation
Nice one 👍👍👍👍👍❤️❤️❤️
it's throwing an error:
Error Code: 1288. The target table remove_duplicate of the DELETE is not updatable
Can we use rowid to delete duplicate?
sure we can use rowid to delete duplicate records .. this can be achieved by using subquery or CTE
when use insert into table _name
select * from # table _name - it is showing error like not supply and match values
What is the application u use?? Thanks
Which?
Which tool is this to run queries ?
SQL Server Management Studio
Waste