Reviewed by Aditya Kumar · Last reviewed 2026-03-24
**Hash-based**: Compute MD5/SHA256 of concat(col1, col2, ...); compare to stored hash per key. New/changed = different hash. **Full comparison**: Diff all columns; expensive for wide tables. **Checksum**: Per-row checksum. **State table**: Store last hash or last record per key;...
Hash-based: Compute MD5/SHA256 of concat(col1, col2, ...); compare to stored hash per key. New/changed = different hash. Full comparison: Diff all columns; expensive for wide tables. Checksum: Per-row checksum. State table: Store last hash or last record per key; incremental run processes only changed. Merkle tree: For very large sets—hierarchical hash. Trade-off: Hash collision (rare); column order must be stable.
Red Flag: Hash without handling column order changes. Pro-Move: 'We used sorted column hash and stored in control table—detected 99.99% of changes; 2 false positives in 6 months from collation change.'
According to DataEngPrep.tech, this is one of the most frequently asked SQL interview questions, reported at 1 company. DataEngPrep.tech maintains an editor-reviewed database of 1,863 data engineering interview questions across 7 categories.