I have one mastertable id Accessories CarColor variant values ( 1 863,862 6 2 5) etc (all id’s are going in my mastertable ) and 5 other table like car color,variant etc which has values
id color
5 red
6 blue
3 green
I need value from each child tables whose id = mastertable.id
like
SqlCommand sqlCommand = new SqlCommand(" select * from cartable where carcolor.id = mastertable.carcolor ") ;
SqlCommand sqlCommand = new SqlCommand(" select * from varianttable where variant.id = mastertable.variant ") ;
SqlCommand sqlCommand = new SqlCommand ("select * from accessoriestable where accessories.id = mastertable.accessories ") ;//
my question is how can i join all 5 select statements together
or any better solution for this ?
I guess you need this?
If as you’ve described in the comment
mastertable.carcolor(and others) contains a comma separated list ofId‘s invarcharthen it should be: