<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    分享java帶來的快樂

    我喜歡java新東西

    oracle sql 精典

    1替換 字段中的指定位置字符
    select mi_temp_password,Concat(Concat(Substr(mi_temp_password, 1, 1),'1'),Substr(mi_temp_password, 3))
      from new_test t
     where mi_id = 1033209
    2.三個(gè)月內(nèi)登錄過的用戶列表
    select lastlogindate > Add_months(sysdate, -3) from dual
    3. select *
      from (select selectrow.*, rownum rownum_
              from (select t.* from ins_b_userinfo t order by id asc) selectrow)
     where rownum_ < 20
       and rownum_ > 1
    4.刪除最大的重復(fù)id
    delete from pi_d_answer
     where id in
           (select maxid
              from (select max(id) as maxid, childprojectid, userid, count(*)
                      from pi_d_answer t
                     group by childprojectid, userid
                    having count(*) > 1|-)
                     order by childprojectid asc))
    5.更新sql
    5.1:update pi_d_childproject t set surveyid=(select s.id from pi_d_survey s where t.id=s.childprojectid)
    5.2:update (select t.id, e.earning eearning, t.earning tearning
              from pi_d_userinfoext e, tmp t
             where t.id = e.id) rs
       set rs.eearning = rs.tearning
    6.顯示case select 結(jié)果

    SELECT sex,
           case when (SUBSTR(BIRTHDAY,0,4)  < '1983' and SUBSTR(BIRTHDAY,0,4)  > '1970')  then '比我大的'
                when (SUBSTR(BIRTHDAY,0,4)  < '1970' and SUBSTR(BIRTHDAY,0,4)  > '1960')  then '比我大的2'
                else '比我小的' end as ages,
                count(*)
      FROM PI_V_SAMPLE_CONDITION
     WHERE BIRTHDAY IS NOT NULL
       AND BIRTHDAY <> 0
       AND SEX IN(1,2)
     GROUP BY sex,
              case when (SUBSTR(BIRTHDAY,0,4)  < '1983' and SUBSTR(BIRTHDAY,0,4)  > '1970')   then '比我大的'
                   when (SUBSTR(BIRTHDAY,0,4)  < '1970' and SUBSTR(BIRTHDAY,0,4)  > '1960')  then '比我大的2'
                else '比我小的' end;
    7.替換field里面的值
    update tbl_lib_question set title=trim(Substr(title,Instr(title,'.',1,1)+1)) where type=4 and  id >2600

    posted on 2007-04-29 15:14 強(qiáng)強(qiáng) 閱讀(366) 評論(0)  編輯  收藏 所屬分類: Oracle數(shù)據(jù)庫

    主站蜘蛛池模板: 亚洲国产综合精品一区在线播放| 免费A级毛片无码专区| 毛片免费视频观看| 久久久久亚洲精品成人网小说| 国产做国产爱免费视频| 一本久久a久久精品亚洲| 中文字幕版免费电影网站| 亚洲精品一品区二品区三品区| 中文精品人人永久免费| 久久久久亚洲精品无码系列| 特级精品毛片免费观看| 亚洲精品免费在线| 无码一区二区三区免费视频| 亚洲成AV人片久久| 免费黄色毛片视频| 免费大片av手机看片| 亚洲午夜久久久久久久久电影网| 两个人日本免费完整版在线观看1| 久久91亚洲人成电影网站| 亚洲视频在线观看免费| 亚洲性69影院在线观看| 日本免费网站在线观看| 一级毛片免费不卡直观看| 日本亚洲欧洲免费天堂午夜看片女人员| 国产在线精品一区免费香蕉| 亚洲精品中文字幕乱码影院| 免费看的黄色大片| 国产高潮久久免费观看| 666精品国产精品亚洲| 好吊妞998视频免费观看在线| 成人午夜影视全部免费看| 好看的电影网站亚洲一区| 四虎在线最新永久免费| 国产精品亚洲色婷婷99久久精品| 亚洲人成在线播放网站| 免费精品国产自产拍在| 一级做a爰片久久毛片免费陪| 亚洲av无码成h人动漫无遮挡| 在线观看无码的免费网站| 中国一级特黄的片子免费 | 色se01短视频永久免费|