mysql - How to connect two select results in sql statement?
滿天的星座
滿天的星座 2017-05-25 15:08:05
0
2
867

As shown in the figure, these two results are obtained from select queries. How to join them and merge them?

滿天的星座
滿天的星座

reply all(2)
Ty80

UNION

大家讲道理

The union fields must be the same. You can add a field (number of people entering the site) to the result of the first picture as 0. The
sql statement is as follows (select time_start, time_end,0 as num from table) union
(select time_start, time_end, num from table );
num refers to the number of people entering the station

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template