SQL insert and update
Is there any1 can help me to my lines
ex...
Table 1
Acct_Num Name
123456 Mhel
123465 Jhen
Table2
Acct_Num Name
123456 Mhel
125555 Jenny
133455 Led
I want to insert the record not listed in the Table 1 e.g(125555, Jenny and 133455, Led) but, the problem is Table 2 has an existing record from Table1...
Insert into Table1(Acct_Num, Name) Select Acct_Num,Name from Table2 where not exists(Select Acct_Num, Name from Table1)
tnx, i highly appreciated those who want to give some help...
|