我有一个 SQL 语句,我想在这样的条件 case 语句中使用 distinct 关键字...
SELECT case when <condition> then distinct t.myfield else null end as my_field
但是,如果我尝试运行查询,则会收到“缺少表达式”错误。
有什么建议?
提前致谢
sql sql-server
sql ×1
sql-server ×1