首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

高分求救,该如何处理

2012-01-19 
高分求救select*from(select(selectcodefromkklw.checkpoint_codewherecodekkbhandtype 2 )code, +(s

高分求救
"select   *   from   (   select   (select   code   from   kklw.checkpoint_code   where   code=kkbh   and   type= '2 ')   code, "+
"(select   display   from   kklw.checkpoint_code   where   code=t1.kkbh   )   diaplay,   "+
"sum(t1.jsl)+sum(t1.csl)   ,sum(t1.jsl)   ,sum(t1.csl)   ,sum(t1.sbsl),sum(t1.wsbsl)   "+
"   from   kklw.vehicle_flow_statis_hour   t1   where   t1.sj> = ' "+weekstart0+ " '   and   t1.sj <= ' "+weekend0+ " ' "+
"group   by   t1.kkbh)   t   where   t.code   is   not   null ";
t和t1是什么,为什么要用他们

[解决办法]
t和t1 都是表名代替 ,你完全可以用a ,b 来代替,
也可以不用,如果你不闲麻烦写表的名字
[解决办法]
是别名,你可以随便取的。
[解决办法]
别名
[解决办法]
t,t1是表的别名;
code,diaplay是对应所作选取列的别名,
为了书写和阅读直观,明了!
[解决办法]
表名有时过长。为减少语句长度简捷不易出错

热点排行