无法从数据库中检索数据 - 错误1241

时间:2015-03-31 14:47:23

标签: php mysql

错误

SQL查询:文档

SELECT status.id AS id, status.status
FROM STATUS
WHERE id
IN (

SELECT student.id, student.fname
FROM student,
STATUS WHERE student.id =14
)
ORDER BY status_id DESC
MySQL说:文档
#1241 - Operand should contain 1 column(s)

2 个答案:

答案 0 :(得分:0)

SELECT内的IN()不应选择多个列。

答案 1 :(得分:0)

在子句“SELECT student.id,student.fname”中你必须只提取一个字段