I am working on databases and now I need some advice’s from you guys..
I have 2 databases with many rows and columns and these db’s contain addresses of customers.
Lets name the databases a A,B.
Now the problem is I have to search the addresses of B in A using a primary key lets say email.
If the address exist then its ok.
Else we have to insert the address in to the other database.
Please tell me how can we do this and which language we can use to do this??
Thank you very much for your time to read my question.
I would do it like this:
This saves you from getting the data in to local variables and/or temp tables. The performance should be better.
The important part to realize is that you can hard code values in the select. The order in which you list the columns (insert line) must match the order in which you list the columns in the select line.