如何创建具有值和数组输入的存储过程 [英] How to create a stored procedure having a value and array input
本文介绍了如何创建具有值和数组输入的存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要一个存储过程,该存储过程需要一个会话令牌var-char(150)和一个数组,该数组的值应类似于(vinay,Bhavsar,17031986,MCA),(Rohit) ,Mandiwal,17031986,MCA)(Ankit,Shukla,17031986,MBA)一次,并根据给定的会话令牌检查这些数据是否存在.如果存在数据,则将所有数据存储在一个新表中. ....请有人帮我创建此存储过程.
解决方案
您好,
以下文章可能会有所帮助.
将数据表发送到存储过程 [ ^ ]
以下文章可能会有所帮助.
http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm [在SQL Server中使用表值函数 [ ^ ]
i need a stored procedure which takes a session token var-char(150) and an array having values like (First Name, Last Name,DOB,Education) for e.g (vinay,Bhavsar,17031986,MCA),(Rohit,Mandiwal,17031986,MCA),(Ankit,Shukla,17031986,MBA) at a time and check the database these data are present according to session token given .If data are present then it will store all the data in a new table.....someone please help me to creating this storedprocedure.
解决方案
Hi,
The below article might be helpful.
Sending a DataTable to a Stored Procedure[^]
Hi,
The below article might be helpful.
http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm[^]
---:TK:---
If you are using sql server 2008 then only it is possible send array as parameter
Using Table-Valued Functions in SQL Server[^]
这篇关于如何创建具有值和数组输入的存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文