您的位置:程序门 -> web 开发 -> asp



问一个简单的sql语句,可是我不会


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


问一个简单的sql语句,可是我不会
发表于:2008-01-16 17:13:18 楼主
请教一个sql语句,sendnumber表中有2个字段,mobile与province。

select   b.city   from   sendnumber   a   inner   join   sp_mobile   b   on   left(a.mobile,7)=b.mobile
我想把这样取出来的b.city,插入到sendnumber表中的province字段里,通过mobile建立对应关系,不知道大家能不能明白我的意思。
发表于:2008-01-16 17:14:531楼 得分:0
自己占沙发
发表于:2008-01-16 17:20:302楼 得分:0
晕,没人进来啊
发表于:2008-01-16 17:36:053楼 得分:0
不明白
发表于:2008-01-16 17:43:144楼 得分:0
取sendnumber里的做循环,查询sp_mobile里的值更新

或者取sp_mobile   里的,循环,批量更新s_n   里的

嘿嘿,只知道这个办法
发表于:2008-01-16 17:51:425楼 得分:0
try:
sql code
update sendnumber set province=b.city from sendnumber a inner join sp_mobile b on left(a.mobile,7)=b.mobile


快速检索

最新资讯
热门点击