SQL 2005-我不想使用"IN" SQL查询中的运算符 [英] SQL 2005 - i dont want to use "IN" operator in SQL query

查看:62
本文介绍了SQL 2005-我不想使用"IN" SQL查询中的运算符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人

例如:where id(从员工中选择id)

我不想在上面给出的SQL查询中使用"IN"运算符
因此,有任何方法可以使用另一种方法.

谢谢

atul

Dear All

eg : where id (Select id From employee)

i dont want to use "IN" operator in SQL query which is given above
So, there is any way to use another method.

thanks

atul

推荐答案

您可以使用联接代替IN子句.

从A,B中选择*,其中A.id = B.id.
You can use a join instead of the IN clause.

select * from A, B where A.id = B.id.


这篇关于SQL 2005-我不想使用"IN" SQL查询中的运算符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆