dtypj3308 2017-04-05 05:51
浏览 41
已采纳

IN条款中的条件和条件

I have Query Like

select * from prop_unit_details where property_id in (7474218,9238369,2634062,993257,8418768,4189003)

But I wanted add AND condition to this query Like

select * from prop_unit_details where property_id in (7474218,9238369,2634062,993257,8418768,4189003) and  bhk ='1BHK' and  budget > 500000  

But Its not working how I can do that.

  • 写回答

1条回答 默认 最新

  • duannan3959 2017-04-05 06:01
    关注

    Just select those two columns (bhk and budget in the first query that you have mentioned) that u have used in the 'and' condition and check whether the bhk column contains 1 BHK value and max value of budget is greater than 500000.

    Eg:

    SELECT bhk, budget 
    FROM prop_unit_details 
    WHERE property_id IN (7474218, 9238369, 2634062, 993257, 8418768, 4189003)
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率