【发布时间】:2010-09-01 09:02:42
【问题描述】:
比较可能包含不同情况的值的列时,最好使用什么方法? 整理更快吗? 只是想弄清楚这一点,因为在我们的项目中进行了大量的数据比较。 我们使用:
select * from table t1, table t2 where
t1.col1 collate SQL_Latin1_General_CP1_CI_AS = t2.colb collate SQL_Latin1_General_CP1_CI_AS
为什么我们不能重写为:
select * from table t1, table t2 where
UPPER(t1.col1) = UPPER(t2.colb)
【问题讨论】:
标签: sql-server sql-server-2005 tsql