Use the NEGATOR modifier with UDRs that return Boolean values.
The NEGATOR modifier names a companion user-defined function, called a negator function, to the current function. A negator function takes the same arguments as its companion function, in the same order, but returns the Boolean complement.
That is, if a function returns TRUE for a given set of arguments, its negator function returns FALSE when passed the same arguments, in the same order. For example, the following functions are negator functions:
equal(a,b) notequal(a,b)
Both functions take the same arguments, in the same order, but return complementary Boolean values. When it is more efficient to do so, the optimizer can use the negator function instead of the function you specify.
To invoke a user-defined function that has a negator function, you must have the Execute privilege on both functions. In addition, the function must have the same owner as its negator function.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]