I have two tables given below
service table
serviceid serviceName title isrestricted
--- -------------- ------ ----------
1 abc t1 0
2 asd t2 1
3 def t3 0
serviceRestricted table
sampletype serviceid
-------- ---------
a 2
output
serviceid serviceName title isrestricted
--- -------------- ------ ----------
1 abc t1 0
3 def t3 0
See the output .For Service id 2 isrestricted=1 and there is entry in the servicerestricted table. So serviceid 2 is not visible in the output