You can also do something like (SQLServer):
declare @variable1 varchar(75)
declare @variable2 varchar(75)
select @variable1 = FirstName, @variable2 = LastName from Employees
where...
Note: if you query returns multiple row, your variables will take on the value of the last row.
Leave a comment: