帮我解释下这个查询语句@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
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/12 01:51:29
![帮我解释下这个查询语句@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](/uploads/image/z/4687851-3-1.jpg?t=%E5%B8%AE%E6%88%91%E8%A7%A3%E9%87%8A%E4%B8%8B%E8%BF%99%E4%B8%AA%E6%9F%A5%E8%AF%A2%E8%AF%AD%E5%8F%A5%40select+c_id%2Cc_gcode%2Cc_number+into+%2311+from+tb_bill_rg+where+c_id+in%28select+c_id+from+tb_bill_r+where+datediff%28day%2Cc_au_time%2C%272007-04-01%27%29%3D0+and+c_ad_from+like+%272%25%27%29+and+c_gcode+not+in%28select+c_gcode+from+tb_d_sum_gds)
帮我解释下这个查询语句@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
帮我解释下这个查询语句@
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 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
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,'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%')
这些是查询条件.
这个的意思是tb_bill_rg 表中c_id字段等于tb_bill_r表中c_au_time字段在2007年4月1日之后并在2007年5月20日之前并且c_ad_from字段为‘2’开头的记录中的c_id字段并且c_gacode字段不包含于tb_d_sum_gds表中c_number_move大于零并且c_dt字段在2007-4-1之后和2007-5-20之后的记录并且c_adno以‘2’开头.
order by c_gcode
这个是以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,tb_gds中的#11.c_id,#11.c_gcode,#11.c_number,tb_gds.c_name字段其中#11表的c_gcode等于tb_gds表的_gcode
以#11表中c_gcode字段排序.