hi
create table f1
(
id int primary key identity(1,1),
Cname nvarchar(20),
CountryID int,
RoleId int
)
insert into f1 values('AA',1,2)
insert into f1 values('BB',1,2)
insert into f1 values('CC',1,1)
insert into f1 values('AA',2,3)
insert into f1 values('BB',2,1)
insert into f1 values('CC',2,4)
insert into f1 values('AA',3,4)
insert into f1 values('BB',3,6)
insert into f1 values('CC',3,1)
insert into f1 values('AA',4,2)
select * from f1 --where RoleId=2
-- I need the data roleid 2 then which country not assigned 2 that will also come
Mark as Answer if its helpful to you
Kumaraspcode2009@gmail.com