SQLite中中实现 if not exist 类似功能

    xiaoxiao2021-03-25  12

    需要实现:

    if not exists(select * from ErrorConfig where Type='RetryWaitSeconds') begin insert into ErrorConfig(Type,Value1) values('RetryWaitSeconds','3') end 只能用:

    insert into ErrorConfig(Type,Value1) select 'RetryWaitSeconds','3' where not exists(select * from ErrorConfig where Type='RetryWaitSeconds') 因为 SQLite 中不支持SP

    转载请注明原文地址: https://ju.6miu.com/read-300375.html

    最新回复(0)