问一个简单的SQL语句 两个表a,b都有ID和des字段,现在想把b中与a中的ID相同但是des不同的搜索出来,并使得b中的des也变成相应的a中的des。最终目的是让两个表中的id相同的des也相同。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 直接把A中的des同步到B中:update b set des=(select des from a where a.id=b.id)只同步不同的项目:update b set des=(select des from a where a.id=b.id and a.des<>b.des) update b set des=(select des from a where a.id=b.id and a.des<>b.des) where id in (select id from a) liujia_0421(SnowLover) ( ) 的正解 update b set des=(select des from a where a.id=b.id) where id in (select id from a)改成这样最保险.. 不好意思,细想了一下,应该是上面这个正确,即:update b set des=(select des from a where a.id=b.id) where id in (select id from a) 或者这样:update b set des=(select des from a where a.id=b.id) where id in (select id from a where a.des<>b.des)这个最好,已测试通过.. reportViewer 怎样动态自定义页面设置呢?在线等待。。。。。。 导出非文字信息(如chart)到excel 求一段浮动图片代码 csdn博客的链接是怎样实际的 请问1个已经建立的数据库连接在另外一个网页中能沿用吗 asp.net 2.0 受保护目录问题 第一次做BBS,希望大家帮帮我, 如何定义DataGrid 表格里面的内容的换行属性?(nowrap 或 wrap) 有关数据库绑定的困惑 高分求-如何用正则表达式验证输入的文本是IP地址的格式? asp.net查询access数据库 菜鸟问题
update b set des=(select des from a where a.id=b.id)只同步不同的项目:
update b set des=(select des from a where a.id=b.id and a.des<>b.des)