try :update set mybool = case mybool when 1 then 0 else 1 end
from mytable
from mytable
解决方案 »
- 求助高手:NHibernate.Cfg.Configuration的类型初始值设定项引发异常。
- 关于execCommand执行的问题。
- 这样的Connection是否关闭了?(代码)
- 小白要找工作了,大家给点建议……
- 怎么实现后台根据条件弹出一个选择对话框?比如说确认充值吗?
- 一个帐号同一时间只能有一个人登录
- ASP.NET中怎么弹出对话框及怎以提交?
- 刚注册第一次来这里,想请教一个.net的问题,比较紧急,非常感谢!
- 简单问题!
- 如何将页面上的后退,前进按钮隐藏或失效。
- 为什么用asp.net作的程序比asp做的同样功能的程序慢? 请asp.net专家解释
- 判断显示图片是不是存在的问题?(高分急送)
begin
declare @tag int select @tag=(select mybool from mytable where id=@myid)
if(@tag=1)
update mytable set mybool=1 where id=@myid
else
update mytable set mybool=0 where id=@myid
end go
declare @tag intbegin
select @tag=(select mybool from mytable where id=@myid)
if(@tag=1)
update mytable set mybool=1 where id=@myid
else
update mytable set mybool=0 where id=@myid
end go
结贴去了。