What are the restrictions, in terms of a number of rows and columns, with MySQL query having no table list?

MySQLMySQLi Database

The restriction on MySQL query having a notable list is that it can return, as a result, exactly one row but that result can contain multiple columns.

Example

mysql> Select 65/NULL,65+NULL,65*NULL,65-NULL,65%NULL;
+------------+--------------+-------------+-------------+---------+
| 65/NULL    | 65+NULL      | 65*NULL     | 65-NULL     | 65%NULL |
+------------+--------------+-------------+-------------+---------+
|       NULL |         NULL |        NULL |        NULL |    NULL |
+------------+--------------+-------------+-------------+---------+
1 row in set (0.00 sec)

In the above example, we can see that MySQL returns only one row with five columns, having the result of five expressions, as a result when we do not have any table list in the statement.

raja
Published on 22-Feb-2018 05:48:58
Advertisements