1、创建表
CREATE TABLE [dbo].[sys_web_UserPermissions]
(
[ID] [int] IDENTITY(1,1) primary key NOT NULL,
[UserCode] [int] NOT NULL,
[xType] [tinyint] NOT NULL,
[ElementName] [varchar](20) NOT NULL,
[Permission] [smallint] NOT NULL,
[Modifier] [varchar](20) NULL,
[ModifyDate] [datetime] NULL,
[remark] [varchar](20) NULL,
[Usertype] [int] NULL
)
2、批量插入数据
insert into 表名 select * from 表
--或
insert into 表名(字段1,字段2) select 字段1,字段2 from 表
-
insert into sys_web_UserPermissions (UserCode,xType,ElementName,Permission,Modifier,ModifyDate,remark,Usertype)
(
select
20059, 2, 'ckmzgzl', 1, '50301', '2019-12-02 00:00:00.000', '工作量',2
union all
select
50033, 2, 'ckmzgzl', 1, '50301', '2019-12-02 00:00:00.000', '工作量',2
union all
select
20020, 2, 'ckmzgzl', 1, '50301', '2019-12-02 00:00:00.000', '工作量',2
union all
select
20210, 2, 'ckmzgzl', 1, '50301', '2019-12-02 00:00:00.000', '工作量',2
union all
select
20351, 2, 'ckmzgzl', 1, '50301', '2019-12-02 00:00:00.000', '工作量',1
union all
select
20493, 2, 'ckmzgzl', 1, '50301', '2019-12-02 00:00:00.000', '工作量',1
union all
select
20093, 2, 'ckmzgzl', 1, '50301', '2019-12-02 00:00:00.000', '工作量',1
)