我有没有办法从逻辑确定的前一列中连接一列?
select
if(p.mfg is not null , p.mfg, 'Private') as MFG,
concat(MFG, " ",p.sku) as TITLE
from product p
答案 0 :(得分:0)
您可以使用{/ 1}}语句,例如
CASE
(OR)使用select
if(p.mfg is not null , p.mfg, 'Private') as MFG,
concat(case when p.mfg is not null then p.mfg else 'Private' end, " ",p.sku) as TITLE
from product p
之类的
inline view