在SQL中有一个表,里面有BH,A,C字段,A字段是区分每条数据的类型,BH...答:create table testa (a char(10), c int insert testa select 'b',5,''create table #test (a char(10), id int identity(1,1))insert into #test select distinct a from testa declare @a int declare @b int set @a=1 select @b=max(id) from #test while (@a<=@b)...