SQL|在select结果集中插入一行数据
1、在select结果集中插入一行数据
select '所有' as 员工编号,'所有' as 姓名 union all
SELECT vc_EmployNo as 员工编号 ,vc_EmployeeName as 姓名
FROM SMS_DateReport
结果如下:
2、在数据库中同时插入三条记录
insert into SMS_DateReport(vc_AutoID,vc_EmployeeName)
select '1','张三' union all
select '2','李四' union all
select '3','王五'
select '1','张三' union all
select '2','李四' union all
select '3','王五'
【SQL|在select结果集中插入一行数据】3