单个字段的话,用distinct就行
多个字段用group by
insert into qy_gydwb
select newid(),qybhid,ghs from qy_ylsb where ghs is not null group by qybhid,ghs
单个字段的话,用distinct就行
多个字段用group by
insert into qy_gydwb
select newid(),qybhid,ghs from qy_ylsb where ghs is not null group by qybhid,ghs