永发信息网

sql查询数据

答案:3  悬赏:0  手机版
解决时间 2021-04-13 06:37
  • 提问者网友:爱了却不能说
  • 2021-04-13 03:10

例如上图 我想查询reciverId为15 和0的两条数据

select * from email where reciverId=15 and reciverId =0 这样为什么只能查出reciverId=15 的那条数据 希望高手指教。。

最佳答案
  • 五星知识达人网友:轻雾山林
  • 2021-04-13 03:55
select * from email where reciverId=15 or reciverId =0
全部回答
  • 1楼网友:掌灯师
  • 2021-04-13 06:08
select * from email where reciverId=15 or reciverId =0要用OR
  • 2楼网友:思契十里
  • 2021-04-13 04:42

select * from email where reciverId=15 or reciverId =0

and 是两个条件都要满足 or只要有一个满足就行了

我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯