Link to home
Start Free TrialLog in
Avatar of davidlars99
davidlars99Flag for United States of America

asked on

select [value] into [variable] from [table]

hi,

how is it possible to achieve something like this?

select min(RowId) into @minRowId from @t1

where @t1 is the table variable and @minRowId is the INT variable
Avatar of Mr_Peerapol
Mr_Peerapol

select @minRowId = min(RowId)  from @t1
SOLUTION
Avatar of Sirees
Sirees

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of davidlars99

ASKER

I did and it didn't work. I'll try again when I get home.


Thanks!
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Forgot to add: Here's a link to MSDN example that explains Mr_Peerapol's response.  

No points for me.