Database design access数据库中的备用数据库
在Access 2007中插入新行之前,我想检查行是否存在。 我在SQL Server中有以下工作查询,但在将其转换为Access时遇到问题Database design access数据库中的备用数据库,database-design,ms-access,Database Design,Ms Access,在Access 2007中插入新行之前,我想检查行是否存在。 我在SQL Server中有以下工作查询,但在将其转换为Access时遇到问题 update category set name='hell' where categoryid=287 if @@rowcount=0 begin insert into category(categoryid,name,path,parentcategoryid,creationdate) values (287,'a','a',12,'') end
update category set name='hell' where categoryid=287
if @@rowcount=0
begin
insert into category(categoryid,name,path,parentcategoryid,creationdate) values (287,'a','a',12,'')
end
试试这个
update category set name='hell' where categoryid=287;
if not exists(select * from Category where categoryid=287)
insert into category(categoryid,name,path,parentcategoryid,creationdate)
values (287,'a','a',12,'');
在access 2007中插入新行之前,我想检查行是否存在。任何帮助都将受到高度赞赏问题在哪里?