0
我有一个存储过程检索数据,过程获取2个参数作为字符串。将参数传递给存储过程som检索数据
这个程序每次都有新的参数被多次调用。
我想只调用一次该过程,并将所有参数作为参数列表发送。
这是我曾尝试
create type dbo.adressAndCity as table
(
[adress] string,
[city] string
)
go
create procedure dbo.selectItems
(
@Items adressAndCity readonly
)
as
begin
select *
from dbo.testTable
// the syntax below is nOt correct
where adress = (@Items.adress) And city = (@Items. city)
end
如何进入参数表中的值?
这RDBMS本作是拼写错误?请添加一个标签来指定您是使用'mysql','postgresql','sql-server','oracle'还是'db2' - 或者其他的东西。 –
根据所使用的语法添加了'sql-server'和'tsql'标记。 –
您可以像访问表中的值一样访问表参数中的值。 –