I have two table A and B with same column and structure i want to compare both tables and insert non matching records from table B into another table. I am using C# and MYSql.
cnn.Open();
string Csql1 = "SELECT FILE_NAME, passport_number, applicant_name, applicant_dob, applicant_gender,issue_date, visa_number, fh_name, application_date, rowid FROM Data_Before_QC ORDER BY old_name ASC LIMIT 1";
da1 = new MySqlDataAdapter(Csql1, cnn);
da1.Fill(dt1);
//string[] arr1 = new string[dt1.Rows.Count];
string Csql2 = "SELECT FILE_NAME, passport_number, applicant_name, applicant_dob,applicant_gender,issue_date,visa_number, fh_name, application_date, rowid FROM Data_Afetr_QC ORDER BY old_name ASC LIMIT 1";
da2 = new MySqlDataAdapter(Csql2, cnn);
da2.Fill(dt2);
foreach (DataRow row1 in dt1.Rows)
{
foreach (DataRow row2 in dt2.Rows)
{
}
}