在写入表中数据时选择是用insert into 还是用update时的问题
当我需要往表中写入一条数据时候
选择使用insert into语句还是用update语句的时候
如:
if exists (select Age from Tab1 where name="张三")
begin
update Tab1 set Age= 25 where name="张三"
end
else
begin
insert into Tab1(Age) select "张三"
end
其中在编译的时候提示error C2061: syntax error : identifier 'exists'这个错误。
怎样解决?
求大神指导!!!谢谢!!!八百里加急 急急急