Skip to content
Advertisement

SQL code takes duplicates in, even though I’ve specified it not to

I’ve written the following code:

The code takes in duplicates (e.g. Image of duplicated values), even though my last code line should have prevented it from doing so. The last line have worked with other parts of my code. Why does this method not work here, and how do I prevent duplicates?

Advertisement

Answer

You can try distinct:

otherwise you may also try union.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement