I'm learning SQL, so I test some queries:
mysql> select * from users where id = 1 or (select id from users);
result:
ERROR 1242 (21000): Subquery returns more than 1 row
I found that if I use any concat
functions like group_concat
, the error will disappear.
But I need to know why the error happened and I'm just select 1 column ' id ' in the subquery.