用途

从多个表是取出相似的字段,并合成到一个表中

  1. --把不同表中的姓名和电话字段合成一个表
  2. SELECT name1 as name, tel_333 as tel
  3. FROM `table1`
  4. UNION
  5. SELECT the_name as name, tel_3 as tel
  6. FROM `table2`