当前位置:网站首页>SQLServer 存储过程传递数组参数
SQLServer 存储过程传递数组参数
2022-07-05 04:45:00 【水杯不满】
问题描述
Create PROCEDURE [dbo].[Ly_Kc_GetKcInfoById]
@strKcId varchar(500)--需传递进来的值为‘1,2,3,4,5’
select * from Table where Id in (@strKcId )
说明Id为Int型
将参数‘1,2,3,4,5’传递进来,执行存储过程会报错.
解决办法:
select * from Table where CHARINDEX(','+cast(Id as varchar(20))+',' , ','[email protected]+',')>0
边栏推荐
- Construction d'un Cluster redis sous Windows
- Special information | finance, accounting, audit - 22.1.23
- WeNet:面向工业落地的E2E语音识别工具
- 2022 thinking of mathematical modeling a problem of American college students / analysis of 2022 American competition a problem
- SQL set operation
- Wan broadband access technology V EPON Technology
- 函數(易錯)
- [groovy] closure (closure parameter list rule | default parameter list | do not receive parameters | receive custom parameters)
- Function template
- Thinking of 2022 American College Students' mathematical modeling competition
猜你喜欢
質量體系建設之路的分分合合
The 22nd Spring Festival Gala, an immersive stage for the yuan universe to shine into reality
A survey of automatic speech recognition (ASR) research
MySQL in-depth learning - index creation and deletion, index design principles, index failure scenarios, query optimization, index push down ICP
函數(易錯)
[Business Research Report] Research Report on male consumption trends in other economic times -- with download link
2021 Higher Education Club Cup mathematical modeling national tournament ABCD problem - problem solving ideas
Web开发人员应该养成的10个编程习惯
Wan broadband access technology V EPON Technology
Reading and visualization of DICOM, MHD and raw files in medical imaging
随机推荐
Basic analysis of IIC SPI protocol
flutter 对象和列表
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
level18
How should programmers learn mathematics
2022-2028 global and Chinese video coding and transcoding Market Research Report
level17
Observable time series data downsampling practice in Prometheus
Flink集群配置
Download the details and sequence of the original data access from the ENA database in EBI
2021 electrician Cup - high speed rail traction power supply system operation data analysis and equivalent modeling ideas + code
[crampon game] MC tutorial - first day of survival
Leetcode 222 number of nodes of complete binary tree
[crampon programming] lintcode decoding Encyclopedia - 872 termination process
[groovy] closure (closure call is associated with call method | call () method is defined in interface | call () method is defined in class | code example)
A survey of automatic speech recognition (ASR) research
Stage experience
Sword finger offer 07 Rebuild binary tree
Label exchange experiment
TPG x AIDU | AI leading talent recruitment plan in progress!