select 1 from table

Solutions on MaxInterview for select 1 from table by the best coders in the world

showing results for - "select 1 from table"
Luis
03 Oct 2017
1select * from StudentTable;
2
3-- output : 
4+------+-------+
5| id   | name  |
6+------+-------+
7|    1 | John  |
8|    2 | Carol |
9|    3 | Smith |
10|    4 | Bob   |
11+------+-------+
124 rows in set (0.00 sec)
13
14-- EXAMPLE OF SELECT 1 
15select 1 from StudentTable;
16
17-- output :
18+---+
19| 1 |
20+---+
21| 1 |
22| 1 |
23| 1 |
24| 1 |
25+---+
264 rows in set (0.00 sec)
27
28-- The above returns 1 four times for 4 records, 
29-- and if we had 5 records then the above query 
30-- would have returned 1 five times.
31