怎么添加数据的方法
如何添加数据的方法。
针对表现有的数据各添加一条数据。有啥性能好的方法添加
create table List
(
companyID nvarchar(10),
NumbersID int
)
insert into List
select 'A001',1 union all
select 'B002',21 union all
select 'C013',35 union all
select 'A001',23 union all
select 'A002',27 union all
select 'B013',35 union all
select 'C085',4
需求:我要针对表里面的ComID的各添加一条数据
如:给每个companyID添加一条NumbersID的值为15的
------解决思路----------------------
针对表现有的数据各添加一条数据。有啥性能好的方法添加
create table List
(
companyID nvarchar(10),
NumbersID int
)
insert into List
select 'A001',1 union all
select 'B002',21 union all
select 'C013',35 union all
select 'A001',23 union all
select 'A002',27 union all
select 'B013',35 union all
select 'C085',4
需求:我要针对表里面的ComID的各添加一条数据
如:给每个companyID添加一条NumbersID的值为15的
------解决思路----------------------
INSERT dbo.List
( companyID, NumbersID )
SELECT
companyID,15
FROM
dbo.List
GROUP BY
companyID