Stop SQL Server Useless Evaluation UP / DOWN WHERE?

it seems that although SQL Server is not suitable for the case in the WHERE clause, it still honors UPPER / LOWER in the WHERE clause, which seems pretty expensive. Can SQL Server be instructed to ignore UPPER / LOWER in a WHERE clause?

This may seem like a pointless question, but it's nice to be able to write a single query for both Oracle and SQL Server.

Thanks Jamie

+3
source share
2 answers

The short answer to your question is no - you cannot force the SQL server to ignore function calls in the statement WHERE.

, , SQL Server WHERE .

, : RDBMS ( , , ). , Oracle SQL Server, , , , - , .

+4

, - :

WHERE YourColumn = @YourValue collate Latin1_General_BIN

, collate, , .

, , , WHERE ( ), . , , , , , , , a, , , .

0

Source: https://habr.com/ru/post/1753350/


All Articles