如何在 SQL Server 中为存储过程传递带有表值的字符串参数(使用 c#)。
我的代码:
C#
SqlParameter tvpParam = cmd.Parameters.AddWithValue(
"@inoper", "'New York','Boston'");
tvpParam.SqlDbType = SqlDbType.NVarChar;
存储过程:
...
WHERE
City IN (@inoper)...
我在这里想念什么?