Fetch 1 value in table and store in variable
=======================================================================================
Declare @query int
select @query = p.ProductID From Product p inner join ReOrdering as r on
p.ProductID = r.ProductID and r.MinQty >= p.Qty_Available
print @query