oracle 更新数据

[复制链接]
查看11 | 回复1 | 2010-1-12 15:43:59 | 显示全部楼层 |阅读模式
先使用select into语句将A列内容存到一个临时表中:select A into #temp from tablename然后将A列内容设置为B列update tablename set A=B然后将B列内容设置为临时表的A列内容update tablename set B=#temp.A from #temp具体执行还要看你的A列和B列数据的类型和长度是否匹配。
回复

使用道具 举报

千问 | 2010-1-12 15:43:59 | 显示全部楼层
直接update 表名 set 列A=列B,列B=列A就可以
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行