SELECT 1 FROM (SELECT 1 FROM table) q
does not working on my local server. it returns totally nothing (no error or empty table).
But SELECT 1 FROM table
is ok.
What is wrong with it? is there any MySQL option for such queries?
SELECT 1 FROM (SELECT 1 FROM table) q
does not working on my local server. it returns totally nothing (no error or empty table).
But SELECT 1 FROM table
is ok.
What is wrong with it? is there any MySQL option for such queries?
Without really being able to understand what you're wanting to achieve, the solution to this problem is:
SELECT 1 FROM (SELECT 1) q;
Assuming that you have a table called "table", the SQL's fine. In my own database:
mysql> select 1 from (select 1 from ui_towngrpcolour) foo;
+---+
| 1 |
+---+
| 1 |
| 1 |
| 1 |
+---+
3 rows in set (0.00 sec)