欢迎投稿

今日深度:

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

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


需要实现:

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

www.htsjk.Com true http://www.htsjk.com/SQLite/27747.html NewsArticle SQLite中中实现 if not exist 类似功能,sqliteexist 需要实现: if not exists(select * from ErrorConfig where Type='RetryWaitSeconds')begin insert into ErrorConfig(Type,Value1) values('RetryWaitSeconds','3')end 只能用: inser...
相关文章
    暂无相关文章
评论暂时关闭