Routine name

Specify the name of an existing routine to overload it for a new data type, or specify a unique routine name to create a routine.

If you are creating a selectivity routine for a user-defined routine, name the selectivity routine RoutineSelectivity.

You can overload built-in operator and other arithmetic routine for collection, row, and distinct data types. (You can overload most arithmetic routines for opaque data types with the New Opaque Type wizard.) How arithmetic routines operate on collection and row data types is determined by the code you write for them. For example, if you overload the Plus() function for a row data type, it might either:
  • Add the values of the fields and return a row data type with the same number of fields as the originals.
  • Return a row data type with twice as many fields as the originals.

Although it is not necessary, you can create new support routines for collection, row, and distinct data types.