sqlite upstart查询语法



表寄存器

app
123 insta

您需要的WHERE子句仅在SELECT语句中有效,因此不要使用VALUES,而是正确使用SELECTEXISTS

INSERT INTO inbox(EventSourceApplication, EventName, MessageId, MessageText, status)
SELECT 'fb1', 'appointmentbooked', 'CAR201246', 'SUCCESSFULL', 'nope' 
WHERE EXISTS (SELECT 1 FROM register WHERE key='123' AND app = 'insta') 
ON CONFLICT(MessageId) DO UPDATE SET 
EventSourceApplication = EXCLUDED.EventSourceApplication,
EventName = EXCLUDED.EventName,
MessageText=EXCLUDED.MessageText;

相关内容

  • 没有找到相关文章

最新更新