我有SELECT field(foo,'this','that','bar','baz') FROM t WHERE f1 IN ('this','that','bar','baz')
如何避免列出('this','that','bar','baz')
两次?
我有SELECT field(foo,'this','that','bar','baz') FROM t WHERE f1 IN ('this','that','bar','baz')
如何避免列出('this','that','bar','baz')
两次?
尝试使用FIELD 函数的返回值并确保它不为零: