Answers for "syntax to difference in sql"

SQL
4

sql difference between two tables

(SELECT * FROM T1 MINUS SELECT * FROM T2)   -- Rows that are in T1 but not in T2
UNION ALL
(SELECT * FROM T2 MINUS SELECT * FROM T1);  -- Rows that are in T2 but not in T1
Posted by: Guest on July-02-2021
3

sql difference between tables

-- Oracle

-- Example
SELECT * 
FROM Table1 -- the table containing extra records
  MINUS
  SELECT * 
  FROM Table2;

-- Syntax 
SELECT * 
FROM <table-1> -- the table containing extra records
  MINUS
  SELECT * 
  FROM <table-2>;
Posted by: Guest on May-20-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language