In T-SQL, this is allowed:
DECLARE @SelectedValue int SELECT @SelectedValue = MyIntField FROM MyTable WHERE MyPrimaryKeyField = 1
So, it\'s
You'd need to use return values.
DECLARE @SelectedValue int CREATE PROCEDURE GetMyInt (@MyIntField int OUTPUT) AS SELECT @MyIntField = MyIntField FROM MyTable WHERE MyPrimaryKeyField = 1
Then you call it like this:
EXEC GetMyInt OUTPUT @SelectedValue