Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT *
- FROM table1 t1
- WHERE EXISTS (select * from table1 t2 where t1.name = t2.name and t2.id is null)
- ORDER BYy Id, Name
- SELECT t1.*
- FROM table1 t1
- INNER JOIN
- ( SELECT [Name]
- FROM table1
- GROUP BY t1. [Name]
- HAVING COUNT(*) >1 ) t2 ON t1.Name = t2.Name
- ORDER BY t1.Customer, t1.Name
- DELETE
- FROM table1
- Where Name in ('name1', 'name2'.......)
- and id3 is not NULL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement