Does Sql Server CE supports MERGE statement

孤者浪人 提交于 2019-12-02 16:16:19

问题


I'm trying to run a MERGE query against a Sql Server CE database but it's throwing the error :

There was an error parsing the query. ...

while the same query is working fine in Sql Server . is merge statement not supported in Sql Server CE at all ? if so , is there any equivalent statement for CE ?

MERGE [Books] as T 
USING(SELECT 1 S) as S 
ON T.Category ='Fiction' AND T.Lang='En'
WHEN MATCHED THEN
UPDATE SET Title=@Title
WHEN NOT MATCHED THEN 
INSERT (Id , Title , Lang , Category) VALUES (@Id , @Title , @Lang , @Category);

回答1:


No, MERGE is not supported in SQL Server Compact, you must use a combination of UPDATE and INSERT



来源:https://stackoverflow.com/questions/14091092/does-sql-server-ce-supports-merge-statement

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!