|
Execute the following Microsoft SQL Server Transact-SQL (T-SQL) script in Management Studio (SSMS) Query Editor, SQLCMD or other client software
to demonstrate the data compare of two identical tables using the EXCEPT operator. If both EXCEPT queries return empty result sets, the two tables are identical.
use tempdb;
go
select * into dbo.ProductInventory
from AdventureWorks.Production.ProductInventory
go
select * from dbo.ProductInventory
except
select * from AdventureWorks.Production.ProductInventory
go
select * from AdventureWorks.Production.ProductInventory
except
select * from dbo.ProductInventory
go
|