Home Sql SQL IN Parameters



SQL IN Parameters
Posted on: December 20, 2008 at 12:00 AM
A parameter is a placeholder that accept a user-defined value, whenever stored procedure is executed.

SQL IN Parameters

     

A parameter is a placeholder that accept a user-defined value, whenever stored procedure is executed.

Understand with Example

This Example shows you how to use in type parameters. The Tutorial illustrates an example, which create a procedure 'abc' and accept input parameter. The input parameter allows the invoker to pass the data into the procedure. 

Create Procedure

delimiter $$
create procedure abc(IN a int)
BEGIN 
	SET @x = a;
END$$
delimiter ;

Call Procedure

call Procedure name is used to execute the procedure.

call abc(123);

Fetch variable value

Fetch Variable (@value) return you the value of parameter in the Query.

select @a;

Result

+------+
| @x   |
+------+
| 123  |
+------+

Related Tags for SQL IN Parameters:
cuserexecvalueparameterexedefineexecutetoramstoreldproceprocedureplaceholderuseceinmparacemeproparamacceptcutdefinedstoredtorwhensuser-definedxeatoldishameterduarccwhenevervassrocthstaluhatfinholderplprolo


More Tutorials from this section

Ask Questions?    Discuss: SQL IN Parameters  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.