How can I compare fields on two databases

10 pts.
Tags:
Database programming
FORALL loop
FORALL statement
I want to list all fields on a database and use a forall loop to check list of fields on two forms in two seperate databases...can this be done

Answer Wiki

Thanks. We'll let you know when a new response is added.

You will need to specify what database and programming language you are using, in order to get some useful responses.
———–

Use information_schema if supported:

<pre>select column_name from <db1>.information_schema.columns
except
select column_name from <db2>.information_schema.columns</pre>

and

<pre>select column_name from <db2>.information_schema.columns
except
select column_name from <db1>.information_schema.columns</pre>

the database table you need to update is different from one database to other.

so kindly let me know the database you are using.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following