update s1
set foodId=s1.id
from room s1,room s2
where s1.id=s2.id;
《===》
update room set roomId=id
SQL Server数据库中把一个表中的一列复制到另一列的SQL语句
原创mb64660286caedc 博主文章分类:数据库相关 ©著作权
文章标签 SQL Server SQL Microsoft 文章分类 HarmonyOS 后端开发
上一篇:SQL 2000创建插入触发器
-
access表某一列统一赋值 access 复制一列到另一列
* 说明:复制表(只复制结构,源表名:a 新表名:b)select * into b from a where 1 <> 1 * 说明:拷贝表(拷贝数据,源表名:a 目标表名
access表某一列统一赋值 数据库 一般用户 表名 系统管理员