Skip to content
Advertisement

Finding whether duplicates exists in 2 select statements

Could you please help me with SQL statement to find duplicate names present in first Select statement and the second.

For example : I need to find whether student with same name in Class 1 is present or not in Class 2 or 3.

and Second select statement is :

If there is matching occurrences for any name then I want to select that record.

Advertisement

Answer

Join could be one option

OR alternatively, you can try using exists

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