I am trying to determine if there is a way to obtain all UserName,UserID rather than retrieving one value at a time?
Declare @TestID Nvarchar (255)
Set @TestID = '123456'
Select User.UserName,User.UserID
From User Join
Acc On User.CID = Acc.ID
Where Acc.MyID = @TestID;