I have two SQL files, one is old.sql
and the other one is new.sql
.
Suppose old.sql
contains a table with three fields, Emp_Id, Name and Address and data stored in old.sql as follows:
Insert into table1 values (101 ,"a", "xyz");
Insert into table1 values (102 ,"b", "pqr");
Then I have changed "a" address "xyz" to "xyz123" and saved that data in the new.sql
file.
Now the new.sql
file contains data as follows:
Insert into table1 values (101 ,"a", "xyz123");
Insert into table1 values (102 ,"b", "pqr");
When I use the diff
command like this:
diff old.sql new.sql
it gives differences line-wise but I want only updated data, like xyz123.