help me with below requirement:
here DepartmentID is common in both the tables
Select name, Empid, DepartmentID from Table1 where name like ’%abc%’
Result :
Name | Empid | DepartmentID |
IA_ABC | 123 | 234 |
ABC | 345 | NULL |
Select name, DepartmentID from Table1 where name like ’%abc%’
O/P”
Name | Department ID |
ABC | 234 |
Expected Result:
Name | Empid | Department ID |
IA_ABC | 123 | 234 |
ABC | 345 | NULL |
ABC | NULL | 234 |
Table 2 contains only name & DepartmentID but not empid