MySQL---Subquery returns more than 1 row
生活随笔
收集整理的這篇文章主要介紹了
MySQL---Subquery returns more than 1 row
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
例如:
select * from user_facility where user_id = 60040012 and facility_id = (select facility_id from scene_facility_room where room_id = 5);會報錯 Subquery returns more than 1 row
原因:
因為使用的字段使用的=,只符合select語句只查出一條記錄的情況。
如果查出的記錄是多條記錄,這時上述語句會報Subquery returns more than 1 row
解決:
有兩種方法
總結
以上是生活随笔為你收集整理的MySQL---Subquery returns more than 1 row的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Android 出现“此用户无法使用开发
- 下一篇: unable to access ‘ht