Posted on 2008-07-28 11:02
G_G 阅读(1264)
评论(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 1
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 ;
数据库报表表链为空项替换为0table 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 ;