Software >> Services >> RDBMS >> MySQL >>  How to assign the result of a select statement to a variable

set @var1 = ( select name from table1 where name = @name_var )
select @var1