I have a table which can have a maximum of 5 rows and minimum 1 row. Now I need to store these rows in different variable like @v1,@v2,@v3,@v4,@v5. How can I do it?
The Table has only 1 column custid.
CustId
100
200
300
400
If the table contain only 1 row then @v1 should have that value and rest can be null.