SyntaxFix
Write A Post
Hire A Developer
Questions
Assuming such a query would return a single row, you could use either
select @EmpId = Id from dbo.Employee
Or
set @EmpId = (select Id from dbo.Employee)