DIFFERENCE Function Examples

Use the examples as reference for DIFFERENCE function usage.

Example 1

The following statement returns the value 4:

SELECT DIFFERENCE( 'Smith', 'Smith' ) FROM iq_dummy

Example 2

The following statement returns the value 4:

SELECT DIFFERENCE( 'Smith', 'Smyth' ) FROM iq_dummy

Example 3

The following statement returns the value 3:

SELECT DIFFERENCE( 'Smith', 'Sweeney' ) FROM iq_dummy

Example 4

The following statement returns the value 2:

SELECT DIFFERENCE( 'Smith', 'Jones' ) FROM iq_dummy

Example 5

The following statement returns the value 1:

SELECT DIFFERENCE( 'Smith', 'Rubin' ) FROM iq_dummy

Example 6

The following statement returns the value 0:

SELECT DIFFERENCE( 'Smith', 'Wilkins' ) FROM iq_dummy