Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
看起来您需要存在
or exists ( SELECT * FROM Table2 WHERE TestID = @Id )
It looks like you need exists
在中使用 在之前,您将始终获得一行,以防相同的@id有多个行。
@id
SELECT top 1 * FROM Table2 WHERE TestID = @Id
虽然我不确定这行在中如何工作子句,因为它不会返回任何boolean
中如何工作
boolean
Use top 1 before * from this way you will always get a single row in case there are multiple rows for the same @ID.
top 1
* from
@ID
Though I am not sure how this line works in where clause as it does not return any boolean
where
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(2)
看起来您需要存在
It looks like you need exists
在中使用
在之前,您将始终获得一行,以防相同的
@id
有多个行。虽然我不确定这行在
中如何工作
子句,因为它不会返回任何boolean
Use
top 1
before* from
this way you will always get a single row in case there are multiple rows for the same@ID
.Though I am not sure how this line works in
where
clause as it does not return anyboolean