Declare and Set (Batch output)

  • 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;

  • What do you get when you run:

    Select User.UserName,User.UserID

    From User Join

    Acc On User.CID = Acc.ID;


    And then again, I might be wrong ...
    David Webb

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply