数据库按条件迁移表的列的值

来源:互联网 发布:直播实时转播软件 编辑:程序博客网 时间:2024/05/17 02:31

数据库按条件迁移表的列的值,

使用sql的update 语句


update stu a set a.testid=(

select b.name from student b

where b.id=a.id

)

where a.id is not null

0 0
原创粉丝点击