VPS business hosting starting at $29.95/24/7 premium technical support

How to find rows which exist in new table but not in old table – MySQL

SQL Query:

SELECT t1.stone FROM newatt t1 LEFT JOIN att t2 ON t2.stone = t1.stone WHERE t2.stone IS NULL

newatt = new table (contains updated extra rows)
att = old table
stone = column name on both tables

Author: Harshvardhan Malpani

PHP Developer based in New Delhi, India. Working as a freelance web developer providing server deployment, website development and maintenance services.

Leave a Reply

Your email address will not be published. Required fields are marked *