It's quite simple but I can not find the information I want, people!
I once saw how to do this but it was very shallow, but I'll explain what I want:
I have a variable and I want it to receive the value of a certain column that will come with a select
...
set @CPF = blablabla;
select * from userdocuments where Description = @CPF;
set @userID = Aqui eu quero armazenar o valor da coluna User_id que virá com o select acima;
How do I make this variable @userID
receive the value of the column?