Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Jeff Atwood 问了关于参数化 SQL IN 子句的原始问题,但我想用整数列来做这个。如果我尝试原始帖子中的代码,我会得到以下异常,这是有道理的:
转换 varchar 值“%|”时转换失败 为数据类型 int。
有人尝试过这个吗?
我认为 Jørn Schou-Rode 在评论中给出了最佳答案,他链接到这个问题的最佳答案:
参数化 SQL IN 子句?