I have created a stored procedure that takes an argument
ALTER procedure [dbo].[myprocedure](@myName char(20))
as
select param1
from table1
where name = @myName
Now this is working but when I try to select parameters from other tables it is not working I tried like this after the first select
(Select param2 table2)
But I get
MS 512, Level 16, State 1, Procedure candidate, Line 3
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Does anyone know hot to use the select to get values from more than one table? Thanks