帮我解释下这个查询语句@select c_id,c_gcode,c_number into #11 from tb_bill_rg where c_id in(select c_id from tb_bill_r where datediff(day,c_au_time,'2007-04-01')=0 and c_ad_from like '2%') and c_gcode not in(select c_gcode from tb_d_sum_gdswhere c_number_move>0 and datediff(day,c_dt,'2007-04-01')=0 and c_adno like '2%') order by c_gcodeselect #11.c_id,#11.c_gcode,#11.c_number,tb_gds.c_name from #11,tb_gds where #11.c_gcode=tb_gds.c_gcodeorder by #11.c_gcode有很多地方不

问题描述:

帮我解释下这个查询语句@
select c_id,c_gcode,c_number into #11 from tb_bill_rg where c_id in(select c_id from tb_bill_r where datediff(day,c_au_time,'2007-04-01')=0 and c_ad_from like '2%') and c_gcode not in(select c_gcode from tb_d_sum_gds
where c_number_move>0 and datediff(day,c_dt,'2007-04-01')=0 and c_adno like '2%')
order by c_gcode
select #11.c_id,#11.c_gcode,#11.c_number,tb_gds.c_name from #11,tb_gds where #11.c_gcode=tb_gds.c_gcode
order by #11.c_gcode
有很多地方不明白,请逐步细致的帮我解释哈
特别像#11,这个代表什么?

select c_id,c_gcode,c_number into #11 from tb_bill_rg 的意思是:在tb_bill_rg 表中查询c_id,c_gcode,c_number字段写入#11表中相应字段.where c_id in(select c_id from tb_bill_r where datediff(day,c_au_time,...