I am currently trying to create a stored procedure where it first grabs the RUId(Registered User ID) from the first table.And then uses this variable to query another table
The easiest way to explain this is by showing the a pseudo code of this request as shown below
create procedure GetRUIdForUser
@Email nvarchar (160)
AS
SELECT RUId From RegisteredUsers
WHERE Email = @Email
Then
Select * From OtherTable where Ruid = @Ruid
What would the correct syntax for this be or would this need to be split up into two separate stored procedures?
Thanks!