Hi

Why this query doesn't work ?

<<
SELECT 
  '1' AS id 
FROM 
  users
ORDER BY id
LIMIT 1
UNION
SELECT 
  '2' AS id 
FROM 
  users
>>

And this one work ?

<<
SELECT 
  '1' AS id 
FROM 
  users
UNION
SELECT 
  '2' AS id 
FROM 
  users
ORDER BY id
LIMIT 1
>>

-- 
-------------------------------------------------------------------------
| Dans le cours d'un long gouvernement, on va au mal par une pente      |
| insensible, et ne remonte au bien que par un effort.                  |
|                       Montesquieu, "de l'esprit des lois" livre V/VII |
-------------------------------------------------------------------------
Emmanuel Engelhart alias Kelson | ICQ UIN : 53388731 | TEL 01.58.46.04.79

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to