Posts Tagged ‘index’

CASE used in CREATE INDEX

The following is a neat way to index id1,id2 when id is not null, and index NULL,NULL (which won’t be indexed) when it is: