How to pass an array into a SQL Server stored procedure

前端 未结 11 2420
轻奢々
轻奢々 2020-11-21 23:28

How to pass an array into a SQL Server stored procedure?

For example, I have a list of employees. I want to use this list as a table and join it with another table.

11条回答
  •  孤独总比滥情好
    2020-11-21 23:51

    There is no support for array in sql server but there are several ways by which you can pass collection to a stored proc .

    1. By using datatable
    2. By using XML.Try converting your collection in an xml format and then pass it as an input to a stored procedure

    The below link may help you

    passing collection to a stored procedure

提交回复
热议问题