1、
INSERT INTO table_xxx(x1,x2,x3,x4)
SELECT y1,y2,y3,y4 FROM TABLE_yyy
WHERE
CASE
WHEN y5 = m5
THEN
y6 = m61
ELSE
y6 = m62
END
AND y7 = m7;
2、
INSERT INTO table_xxx(x1,x2,x3,x4)
SELECT y1,y2,y3,y4 FROM TABLE_yyy
WHERE
y6 =
CASE
WHEN y5 = m5
THEN
m61
ELSE
m62
END
AND y7 = m7;
期中,第二种情况在C#中执行会抛出异常说字段不匹配,在使用mysql_log 工具执行的时候会出现警告。