【sql语句 】 update top 的问题

yuna@liu 2010-06-13 09:54:26
我有表A (卡)
cardP mobile
1 null
2 null
3 null
4 null
5 null
...............

表B
mobile

133***
150***
888***
-----

现在要给B表的号码mobile分配卡cardP,
怎样写sql语句 ,
实现:修改表A的mobile字段,使4张cardP对应一个B表的mobile
得到结过类似

cardP mobile
1 133***
2 133***
3 133***
4 133***
5 150***
----------------

...全文
170 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhxsglhq 2010-06-13
  • 打赏
  • 举报
回复
发表不知道有没有积分
canxue418 2010-06-13
  • 打赏
  • 举报
回复
你可以新建一张表Table_2,添加四条数据
insert into A(mobile) select B.mobile from B ,Table_2 as c order by B
就可以实现了!
ajq1989 2010-06-13
  • 打赏
  • 举报
回复
insert into A(mobile) select B.mobile from B
宇峰科技 2010-06-13
  • 打赏
  • 举报
回复
请转到sql版

34,590

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧