What is the standard SQL Query to retrieve the intersection of tables?

前端 未结 9 600
谎友^
谎友^ 2021-02-02 03:57

Selecting the union:

select * from table1 
union 
select * from table1_backup 

What is the query to select the intersection?

9条回答
  •  滥情空心
    2021-02-02 04:39

    In SQL Server intersect

    select * from table1 
    intersect
    select * from table1_backup
    

提交回复
热议问题