I want to compare 2 my sql tables with 4 constraints such as firstname,lastname,dob and address.If some records match i want to save it in the new table.
I compared 2 tables with 1 constraint using this query
SELECT * FROM t1 WHERE t1.dob IN (SELECT t2.dob from t2)
Is there any query to do this job?Any Help will be appreciated.
Table 1
First Name Varchar
Last Name Varchar
Dob Date
Address varchar
Email Varchar
City Varchar
Country Varchar
Table2
First Name Varchar
Last Name Varchar
Dob Date
Address varchar
If records matches in these tables I want to save the following Details in Third table as
Table3
First Name Varchar
Last Name Varchar
Dob Date
Address varchar
Email Varchar
City Varchar
Country Varchar