posts - 165, comments - 198, trackbacks - 0, articles - 1
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

一句话 技术 (大家来接龙)

Posted on 2008-07-28 11:02 G_G 阅读(1261) 评论(1)  编辑  收藏 所属分类: javaGeneral
  那位来开个头吧

正则匹配 html标题

    <[hH]([1-9])>.*?</[hH]\1>

数据库查询执行顺序:
    from->where->group by->聚集函数->having->order by
    table level(id,name)
    select count(*) as cu from level where id>1 group by name desc  having cu>=1 order by id ;


火狐 xpath 取 document dom 值:
    id('table8')/tbody/tr[6]/td/@valign



数据库有为空列排放位置:
    1.  select name,
                 case
                         when name is null then 0
                         else 
                 end
                    as is_null
         from level
         order by is_null  ;
    2.select name from level where name is null
       union
      select name from level where name is not null ;

数据库报表表链为空项替换为0
table a (id); values - > 1 ,2 ,3
table b (id,num); -> (1,15),(1,5)
查询结果为 要为
1    20
2    0
3    0

select a.id as id,
        
sum(
            
case
                
when b.num is  null then 0
                
else b.num
             
end
            ) 
as num
from a left join b on a.id=b.id 
group by id ;


评论

# re: 一句话 技术 (大家来接龙)  回复  更多评论   

2008-07-28 11:33 by Robin's Java World
这样的帖子应该发到论坛里,不该放在Blog中。

只有注册用户登录后才能发表评论。


网站导航: