Home Forums SQL Server 7,2000 SQL Server Newbies SELECT TOP into variable RE: SELECT TOP into variable
tbeadle
SSCommitted
Points: 1635
More actions
May 7, 2008 at 1:28 pm
#812033
Hello,
The TOP can go to the right of the assignment too.
like
select @variable = ( select TOP 1 salesAmount from sales )
Regards,
Terry