问题
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