Mysql the two tables stitching together different fields

select id,mobile,realname as name,weixin as message_note,address_des as address,create_time,cateid from v1_user
UNION ALL
select id,mobile,name,message_note,address,create_time,cateid from v1_clue

First, we want to field as a whole, and then use UNION ALL joint.

Note: UNION making table will be linked to the heavy, UNION All will not. Union will be sorted in order of the fields; UNION ALL simply merge the two results after return. So I chose UNION ALL.

Guess you like

Origin www.cnblogs.com/jackzhuo/p/11813352.html