0

我正在尝试MERGE对数据库运行查询,Sql Server CE但它抛出了错误:

There was an error parsing the query. ...

而相同的查询在Sql Server. 根本merge statement支持Sql Server CE?_ 如果是这样,是否有任何等效的声明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);
4

1 回答 1

1

不,SQL Server Compact 不支持 MERGE,您必须结合使用 UPDATE 和 INSERT

于 2012-12-30T14:04:56.823 回答