【发布时间】:2021-08-16 17:50:40
【问题描述】:
如果值为空,我有以下内容仅插入到列 two:
UPDATE name
SET one=?,
two=COALESCE(two, ?),
three=?
WHERE id = ?
但是,这仅在列 two 的值为 null 时才有效。如果它是NULL OR an empty string,我怎样才能让它工作。
它应该总是插入到one 和three。它应该只插入到 two 如果它是 NULL 或空
我在 PHP 中使用 SQLite
【问题讨论】: