Sql Server CE 是否支持 MERGE 语句 [英] Does Sql Server CE supports MERGE statement
本文介绍了Sql Server CE 是否支持 MERGE 语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试对 Sql Server CE
数据库运行 MERGE
查询,但它抛出错误:
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. ...
虽然相同的查询在 Sql Server
中工作正常.merge statement
在 Sql Server CE
中根本不支持吗?如果是这样,CE
是否有任何等效的声明?
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);
推荐答案
不,SQL Server Compact 不支持 MERGE,您必须结合使用 UPDATE 和 INSERT
No, MERGE is not supported in SQL Server Compact, you must use a combination of UPDATE and INSERT
这篇关于Sql Server CE 是否支持 MERGE 语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文