问题如上标题,解决方案如下:
![](https://i-blog.csdnimg.cn/blog_migrate/5f94c2fecb4ccb2f76f50c965d122407.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/50828477840f9be8f01bb82af691c7d1.gif)
1 --T_ADM_NoticeUsers已读,T_SYS_User所有人员(insert into select语句要求T_ADM_NoticeUsers必须存在,我们可以出入T_SYS_User字段和常量) 2 insert into T_ADM_NoticeUsers(NoticeID,UserGuid,UserName,DeptGuid,DeptName,IsRead,CreateTime,CreateBy) 3 select 999,UserGuid,DisplayName,DepartmentGuid,DepartmentName,1,GetDate(),'dengyi' from T_SYS_User 4 5 --select into from语句创建表Test并复制数据 6 select UserGuid,DepartmentGuid into Test from T_SYS_User 7 select * from Test 8 drop table Test