gpt4 book ai didi

java - 错误代码 1241,SQL 状态 21000 : Operand should contain 1 column(s)

转载 作者:行者123 更新时间:2023-11-29 05:18:04 24 4
gpt4 key购买 nike

我在处理查询时收到以下错误代码:

Error code 1241, SQL state 21000: Operand should contain 1 column(s)

select * from room
where room.id in
(
select room.id, room.name, room.capacity, booking.start, booking.end
from room
left join booking on room.id = booking.room
)

最佳答案

您不需要子查询。你可以这样尝试:

select *
from room
left join booking on room.id = booking.room

关于java - 错误代码 1241,SQL 状态 21000 : Operand should contain 1 column(s),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29943239/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com