‘Union查询就是先去重,再排序(即先把重复的项进行了去重,再把ID字段进行排序)
‘Union all查询就是把两张表连接在一起
Sub union联合查询()
SQL = "Select * from 表1 union Select * from 表2"
End Sub
Sub union联合查询()
SQL = "Select * from 表1 union all Select * from 表2"
End Sub
‘来源B站:孙兴华 VBA 查询篇
2023-11-05 23:04:28
‘Union查询就是先去重,再排序(即先把重复的项进行了去重,再把ID字段进行排序)
‘Union all查询就是把两张表连接在一起
Sub union联合查询()
SQL = "Select * from 表1 union Select * from 表2"
End Sub
Sub union联合查询()
SQL = "Select * from 表1 union all Select * from 表2"
End Sub
‘来源B站:孙兴华 VBA 查询篇