mysql - SQL query to compare tables and only return differnces -


so have 2 tables. first table "raw" table, , houses original record when submitted (so never changes, gets additional records). have table has "updated" data (so has same number of records, same columns, values may different).

i want run sql query compare 2 tables. output, want new table lists pk of row had changed value. want return new value.

my end goal able "within column a, had x amount of changes. of changes column a, value updated fill_in_the_blank."

if use basic query:

(select * [test database].dbo.[raw data] except select * [test database second].dbo.[clean data] union select * [test database second].dbo.[clean data] except select * [test database].dbo.[raw data]) 

i rows have different fields, don't know value/column changed.

any thoughts?

thanks!


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -