user1254579
user1254579

Reputation: 4009

What is the command for executing a T-SQL procedure by passing an input value and take an out put value

Sorry to ask this simple question, I am new to T-SQL

What is the command for executing a T-SQL stored procedure by passing an input value and take an output value?

Say for example there are 2 variables like @id (input) and @sal (output)

Requirement is to pass the id and get salary. So do we need to execute like this?

EXEC USP_PROC1 89, 0

(DO I NEED TO PASS THE OUTPUT VARIABLES' DEFAULT VALUE AS WELL)

When I executed it why can not I see any answer? I can only see Command(s) completed successfully.

Upvotes: 0

Views: 53

Answers (1)

Justin Pihony
Justin Pihony

Reputation: 67115

MSDN is your friend. It has tons of examples for you, on top of the basic syntax layout.

Here is another site with some examples.

EXEC USP_PROC1 89,0, @OutputValue OUTPUT

Upvotes: 2

Related Questions