I am new to SQL Server.Prior to this i had done some programming in C.
Consider the below query,
select empid from Emp where deptid=2.
The output of the above query is
now i want to store this values in variable and then used the variable in some future query. Since i cannot used array i would like to know what to used.