当然,如果用其他编程语言在程序上实现是很容易的,只需要查两次表即可。不过我想知道能不能在同一次查询中出现
例如insert into table (a,b,c) values (1,2,3) 和 update table set a=1,b=2 where c=3 可以合并为replace into table a=1,b=2,c=3那么如果我要insert into table (a,b,c) values (1,2,3) 和update table set a=a+1,b=b+2 where c=3 合并起来写成SQL文,应该怎么写?replace table set a=a+1,b=b+2 where c=3 这种写法是不行的,这种写法等号右边出现字段名会自动变成这个字段的默认值而不是现在的值。