??????SQL?????????????????????????????????????ú???????????????????Oracle??????????????????????????裬????????Щ???????????????????????????????
???????????????????????Oracle??????????????裬????:
????1.         substr(hbs_bh??1??4)=’5400’??????????hbs_bh like ‘5400%’
????2.         trunc(sk_rq)=trunc(sysdate)?? ????????sk_rq>=trunc(sysdate) and sk_rq<trunc(sysdate+1)
????3.         ???????????????????????β?????????????磺
????ss_df+20>50??????????ss_df>30
????'X' || hbs_bh>’X5400021452’??????????hbs_bh>'5400021542'
????sk_rq+5=sysdate??????????sk_rq=sysdate-5
????4.         ????????????????????????????????????????磺ys_df>cx_df????????????
????qc_bh || kh_bh='5400250000'??????????qc_bh='5400' and kh_bh='250000'
????5.  ?????????????????
????hbs_bh=5401002554??????????hbs_bh='5401002554'?????????????hbs_bh ?????????to_number????????hbs_bh???????????
???????Щ??????????????????select ??????????????where????е??????к??з???????????????????????????????
????????????н?????????
????drop table t  purge;
????Create Table t  nologging As select *  from    dba_objects d ;
????create   index ind_objectname on  t(object_name);
????select t.object_name from t where t.object_name ='T';        --??????
????select t.object_name from t where UPPER(t.object_name) ='T';       --????????
????select t.object_name from t where UPPER(t.object_name) ='T' and t.object_name IS NOT NULL ;           --??????  (INDEX FAST FULL SCAN)
????select t.object_name from t where UPPER(t.object_name) ||'AAA' ='T'||'AAA' and t.object_name IS NOT NULL ;     --??????  (INDEX FAST FULL SCAN)
????select t.object_name??t.owner from t where UPPER(t.object_name) ||'AAA' ='T'||'AAA' and t.object_name IS NOT NULL ;     --????????
???????????
C:Users????>sqlplus lhr/lhr@orclasm
SQL*Plus: Release 11.2.0.1.0 Production on ?????? 11?? 12 10:52:29 2014
Copyright (c) 1982?? 2010?? Oracle.  All rights reserved.
?????:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning?? Automatic Storage Management?? OLAP?? Data Mining
and Real Application Testing options
SQL>
SQL>
SQL> drop table t  purge;
?????????
SQL> Create Table t  nologging As select *  from    dba_objects d ;
?????????
SQL>  create   index ind_objectname on  t(object_name);
???????????