Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SQLÓï¾äPART8

PairWise subquery:
e.g.:
select * from wf_docsort where (ndocsortid,nmoduleinfoid)  in (select ndocsortid, nmoduleinfoid from wf_docsort where instr(cname,'ÎÄ')>0)
the above sql is the same function as:
select * from wf_docsort where ndocsortid = (select ndocsortid from wf_docsort where instr(cname,'xx')>0) and nmoduleinfoid = (select nmoduleinfoid from wf_docsort where instr(cname,'xx')>0)
A scalar subquery expression is a subquery that: returns exactly one column value from one row. Scalar subqueries can be used in: 1) The condition and expression part of DECODE and CASE 2) All clauses of SELECT except GROUP BY 3) The SET clause and WHERE clause of an UPDATE statement
e.g.:
select * from wf_docsort
results:
1    1    ÊÕÎÄ            SHOUWEN
2    1    ·¢ÎÄ            FAWEN
3    1    ½»°ì            JIAOBAN
4    2    Öµ°à±¨¸æ     REPORT
5    3    ¶½²ì¶½°ì     SUPERVISAL
6    2    Öµ°à¿ì±¨     DAILYREPORT
7    2    ÎÒµÄÊÂÇé     NOTIFY
8    4    Ìá°¸            RESOLUTION
9    4    ½¨Òé            SUGGESTION
select NDOCSORTID, NMODULEINFOID,CNAME,KEY,(
       case when nmoduleinfoid=(
               select nmoduleinfoid from wf_moduleinfo where nmoduleinfoid=1
        ) then 'JEAN1' else (case when nmoduleinfoid=(select nmoduleinfoid from wf_moduleinfo
 &n


Ïà¹ØÎĵµ£º

sqlº¯Êý³£Óú¯Êý

1.     select replace(CA_SPELL,' ','') from hy_city_area  È¥³ýÁÐÖеÄËùÓпոñ
2.     LTRIM£¨£© º¯Êý°Ñ×Ö·û´®Í·²¿µÄ¿Õ¸ñÈ¥µô
3.     RTRIM£¨£© º¯Êý°Ñ×Ö·û´®Î²²¿µÄ¿Õ¸ñÈ¥µô
4.     select LOWER(replace(CA_SPELL,' ','')) f ......

¹ØÓÚSQLSERVERÖиüÐÂTextÀàÐÍSQLÓï¾ä½âÎö

 »ù±¾·½·¨:
                   
UPDATETEXT { table_name.dest_column_name dest_text_ptr }//{ Òª¸üеıíÒÔ¼° text¡¢ntext »ò image ÁеÄÃû³Æ,Ö¸ÏòÒª¸üÐ嵀 text¡¢ntext »ò image Êý¾ÝµÄÎı¾Ö¸ÕëµÄÖµ£¨ÓÉ TEXT ......

ORACLE PL/SQL ¶ÔÏó(object)ѧϰ±Ê¼Ç(¶þ)

4¡¢¶ÔÏóÒÀÀµÐÔ
 
CREATE OR REPLACE TYPE Obj1 AS OBJECT (
f1 NUMBER,
f2 VARCHAR2(10),
f3 DATE
);
/

CREATE OR REPLACE TYPE Obj2 AS OBJECT (
f1 DATE,
f2 CHAR(1)
);
/

CREATE OR REPLACE TYPE Obj3 AS OBJECT (
a Obj1,
b Obj2
);
/
  
 
OBJ3ÒÀÀµÓÚOBJ ......

ORACLE PL/SQL ¶ÔÏó(object)ѧϰ±Ê¼Ç(Èý)

7¡¢¶ÔÏóÀàÐͼ̳Ð
 
¶ÔÏóÀàÐÍʵÏÖÔÊÐíÎÒÃÇ´´½¨Ò»¸ö»ùÀàÐÍ£¬»ò½Ð¸¸ÀàÐÍ£¬ÕâÖÖÀàÐ͵ÄÊôÐÔ»ò·½·¨¿ÉÒÔ±»ÁíÒ»¸ö¶ÔÏóÀàÐͼ̳С£È»ºó¿ÉÒÔ´´½¨Ò»¸ö×ÓÀàÐÍ£¬»ò½Ðº¢×ÓÀàÐÍ£¬Ö±½ÓʹÓü̳йýÀ´µÄÊôÐÔ»ò·½·¨£¬»òÕßÓÃ×Ô¼ºµÄÊôÐԺͷ½·¨ÖØд¸¸ÀàÐ͵ÄÊôÐÔ»ò·½·¨¡£
 
INSTANTIABLE¹Ø¼ü×Ö±íʾÎÒÃÇ¿ÉÒÔ´Ó¸ÃÀàÐÍÖÐʵÀý»¯»òÕß´´½¨¶ÔÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ