Comparing Database Objects
Introduction
Database object can either be compared in SQL WHERE
clauses or in programming code.
Comparison in SQL Queries
In SQL queries database objects can be compared either by the equals =
operator or by the ObjectNo
value. The direct comparison is always preferable.
Comparison Between Instances
Two instances of a database class can be compared either with the Object.Equals
method or with the ObjectNo
value. The Object.Equals
method is the preferable way.
The equals ==
operator and the Object.ReferenceEquals
method will always return false
when comparing database objects.
Last updated