I have a table with 4 columns - ID, ClubID, FitnessTestNameID and DisplayName I have another table called Club and it has ID and Name
I want to add two rows of data to the 1st table for each club
I can write a statement like this, but can someone tell me how to create a loop so that I can insert the two rows, set the @clubid + 1 and then loop back again?
declare @clubid int
set @clubid = 1
insert FitnessTestsByClub (ClubID,FitnessTestNameID,DisplayName)
values (@clubid,'1','Height (cm)')
insert FitnessTestsByClub (ClubID,FitnessTestNameID,DisplayName)
values (@clubid,'2','Weight (kg)')
CREATEstatements. Are some columnsIDENTITY?