怎样用判断的结果来修改表中的值? update a set jj=case when sl=0 then b.dj else je/sl end from b where a.id=b.id --id是两表关联字段 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 update A set JJ=(case when sl=0 then B.Dj else JE/SL end) from A inner join BOn A.關聯字段=B.關聯字段 虽然不关联,但这两个表都有共同的字段code。可以根据code 是否相等来检索。 update a set jj=case when sl=0 then b.dj else je/sl end from b where a.code=b.code update A set JJ=(case when sl=0 then B.Dj else JE/SL end) from A inner join BOn A.Code=B.Code 存储过程传2参数 sql server 子查询原理 可以新建一个别的名称的超级用户,然后删除sa 用户吗?因为sa这个名称谁都知道,不安全.或者保留sa,但是让它没有高权限,可以实现吗?会存在问题吗? 视图创建问题 如何获得某一条记录的排名 用select查询实现数据进位的问题! Help:这个问题怎么解决?马上给分 帮帮我,看看这句SQL如何写? 如何把執行存儲過程的結果集寫入到一個鄰時表中 请教:装载 Msxml2.dll 失败,如何解决??? 数据导入时的问题 求助!!!在线等!!!
On A.關聯字段=B.關聯字段
from b where a.code=b.code
On A.Code=B.Code