【发布时间】:2015-03-04 22:07:41
【问题描述】:
我使用了永远正确的陈述,例如1 = 1 MYSQL where 子句的 case 语句,语法如下:
select * from tablename where
(case when tablefield is not null then
then tablefield = 'value'
else 1 = 1 end)
我想知道如何在 where 子句的 sqlserver/tsql case 语句中使用 else 1 = 1(始终为真语句)。
【问题讨论】:
-
MySQL 和/或 SQL Server?
标签: mysql sql sql-server tsql case