问题如上标题,解决方案如下:
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
View Code
时间: 2024-09-22 01:33:46