Thom A - Wednesday, December 6, 2017 5:23 AM
For the test data created by you I want the following output updated in inline commands.
INSERT INTO details
VALUES (1, 'sara', 'chennai', 't.nagar'),
(1, NULL, NULL, NULL),
(1, 'sara', 'chennai', 't.nagar'),
(2, 'sara', 'chennai', 't.nagar'),
(2, NULL, NULL, NULL),
(3, 'sara', 'chennai', 't.nagar'),
(4, NULL, NULL, NULL),
(5, 'raj', 'vellore', 'kodambakkam'),
(5, 'raj', 'vellore', NULL),
(6, NULL, 'London','Kensington'), /* not required as it is having multiple values for ID(Count=2) and it is having Null value/*
(6,'Steve', 'London',NULL), /* not required as it is having multiple values for ID(Count=2) and it is having Null value/*
(7,'Steve', 'London','Kensington'), /* Required as it is not having null values/*
(7,'Steve', 'London','Barnet') /* Required as it is not having null values/*;
Output Results:
id | name | city | place |
1 | sara | chennai | t.nagar |
1 | sara | chennai | t.nagar |
2 | sara | chennai | t.nagar |
3 | sara | chennai | t.nagar |
4 | NULL | NULL | NULL |
5 | raj | vellore | kodambakkam |
7 | Steve | London | Kensington |
7 | Steve | London | Barnet |
Kindly let me know if you requires any additional details.
Regards,
Saravanan
Saravanan