Create table #tmp_master
(
mst_id
int
)
Create table #tmp_child_one
(
mst_id int,
fname nvarchar(10)
)
Create table #tmp_child_two
(
mst_id int,
name nvarchar(10)
)
insert into #tmp_master
select 1
union all
select 2
union all
select 3
union all
select 4
union all
select 5
go
insert into #tmp_child_one
select 1,'a'
union all
select 2,'a'
union all
select 3,'a'
union all
select 4,'a'
go
insert into #tmp_child_two
select 2,'b'
union all
select 3,'b'
union all
select 4,'b'
union all
select 5,'b'
go
drop table #tmp_master
drop table #tmp_child_one
drop table #tmp_child_two
get output as below
vishnu dalwadi