The invention discloses a
database comparison method and related device.The
database comparison method comprises the steps that firstly, the sequence of fields in a
reference database during query and the
field mapping relation corresponding to a
target database to be compared are obtained, and then the
target database to be compared is obtained according to the sequence of the fields in the
reference database during query on the basis of the
field mapping relation; the method comprises the following steps: determining the sequence of fields corresponding to a target
library during query, then correspondingly generating a
query statement according to the sequence of the fields during query of a reference
library and the sequence of the query fields in the target
library, respectively querying data in a
reference database and a
target database, and comparing the queried data. Therefore, when the data is queried, the standard
database and the target database have the consistent field sequence, so that the
data consistency of corresponding fields in different databases is ensured, the accuracy of data comparison is effectively improved, the manpower and
time cost is saved through the mode, and the efficiency of data comparison is effectively improved.