sqlselect結果
發布時間: 2025-03-17 02:05:35
① sql 多條select結果插入
你insert into test3插入了三項,但是後面select的結果只有1項。。
要統一即可。
不知道你是不要的這個結果:
declare @i varchar(50)set @i='75'
while @i<'80'
begin
insert into test3(MP,ZS,CHD)
values(select @i,
select count(序號)from text where 住址 like '%XX路'+@i+'%',select count(序號) from text where 住址 like '%XX路'+@i+'%' and 出生日期>'19980101')
set @i=@i+2
end
熱點內容