简体   繁体   English

SQL 服务器等效于 Oracle '整数表'

[英]SQL Server Equivalent to Oracle 'table of integer'

Is there a SQL Server equivalent to the Oracle concept of a 'table of integer'?是否有等效于“整数表”的 Oracle 概念的 SQL 服务器?

If so, what is the best way to represent this object in C#?如果是这样,在 C# 中表示此 object 的最佳方式是什么?

Oracle seems to provide the following: Oracle 似乎提供以下内容:

OracleParameter parameter = new OracleParameter(data.parameterName, data.databaseDataType);
parameter.CollectionType = OracleCollectionType.PLSQLAssociativeArray;

I'm aiming to modify this code to work with a DbParameter instead of an OracleParameter and create a SQL Server stored procedure that behaves in the same way as the Oracle SP I'm working with.我的目标是修改此代码以使用 DbParameter 而不是 OracleParameter 并创建一个 SQL 服务器存储过程,其行为方式与我正在使用的 Oracle SP 相同。

I think that what you may be looking for is a SQL Server table-valued parameter , which would map to SqlDbtype.Structured for a SqlParameter .我认为您可能正在寻找的是 SQL 服务器表值参数,它将 map 转换为 SqlDbtype.Structured 用于SqlParameter The relevant DbType would be Object.相关的DbType将是 Object。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM