1

Topic: Request in MySQL: the basic delirium?

Just in case I want to specify.

 SELECT... WHERE
... AND fld1 = (SELECT id FROM tbl WHERE... ORDER BY fld2 ASC) 

If the field (fld1) is compared with SELECT' it is expected, what SELECT returns strictly single line, and to sort it BY fld2 without instructions LIMIT of sense any is not present? Or suddenly is?

2

Re: Request in MySQL: the basic delirium?

At STRICT comparing in a case when the subquery returns more single line, request performance leads to an error.
In the absence of LIMIT in subquery ORDER BY in it it will be ignored.

3

Re: Request in MySQL: the basic delirium?

That is ORDER it is possible to remove safely?

4

Re: Request in MySQL: the basic delirium?

FUKS
If is not present LIMIT 1 - undoubtedly.