Posted on 2008-07-28 11:02
G_G 閱讀(1274)
評論(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?;