Take a look at this and see if it is what you are looking for.declare @BodyPart table(PartId int Identity(1,1),Part varchar(50))declare @Workout table(WorkoutId int Identity(1,1) ,PartID int,Workout varchar(50))insert into @BodyPart(Part)select 'Arms' Union Allselect 'Back' Union Allselect 'Chest' Union Allselect 'Legs' insert into @Workout(PartID,Workout)select 1,'Curls' Union Allselect 1,'Tricep Extensions' Union Allselect 2,'Military Press' Union Allselect 2,'Shoulder Shrugs' Union Allselect 3,'Push Ups' Union Allselect 3,'Bench Press' Union Allselect 4,'Leg Press' Union Allselect 4,'Squats' Select a.Part,b.Workoutfrom @BodyPart aInner Join ( Select Row_Number() over ( Partition by PartID order by newid()) as rowID,* from @Workout ) bon a.PartID = b.PartIDwhere b.RowID = 1
Success is 10% Intelligence, 70% Determination, and 22% Stupidity.\_/ _/ _/\_/ _/\_/ _/ _/- 881