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

дÁËÒ»¸öÉÔ΢¸´ÔÓµãµÄsqlÐĵÃ

select pcode from (
        select h.k,h.d,h.m,h.u,l.areacode,
               l.areacode||substr(h.u,4,length(h.u))||h.k pcode
         from(
        select j.k,j.d,j.m,j.u from(
        select lpad(f,3,0) as k,d, m,u from(
        select xx.areacode d,nvl(count(cy.pcode),'001')f,mx.m,mx.shopcode u
        from cz_s_jtxx xx, cz_s_jtcy cy , 
          ( select a.m,d.shopid,d.shopcode from
        (select shopid m,parentid from s_shop where shoptype=1) a,
        (select shopid,parentid from s_shop where shoptype=2) b,
        (select shopid,parentid from s_shop where shoptype=3)c,
        (select shopid,parentid,shopcode from s_shop where shoptype=4)d
        where d.parentid=c.shopid
        and c.parentid=b.shopid
        and b.parentid=a.m
        and d.shopid=14725) mx
        where xx.pcode = cy.pcode
        and xx.areacode=mx.shopid
        group by xx.areacode,mx.m,mx.shopcode))j)h, 
        (select areacode,shopid  from cz_s_area) l 
       where h.m=l.shopid)
Ê×ÏÈ ´Ó×îÀï²ãµÄ sql˵Æð£º
select a.m,d.shopid,d.shopcode from
        (select shopid m,parentid from s_shop where shoptype=1) a,
    


Ïà¹ØÎĵµ£º

Sql Server 2005Êý¾Ý¿â±»±ê¼ÇΪ¡°¿ÉÒÉ¡±ÎÊÌâ


ÎÊÌâ±³¾°£º
¡¡¡¡ÈÕ³£¶ÔSql Server 2005¹ØÏµÊý¾Ý¿â½øÐвÙ×÷ʱ£¬ÓÐʱ¶ÔÊý¾Ý¿â£¨È磺SharepointÍøÕ¾ÅäÖÃÊý¾Ý¿âÃû
Sharepoint_Config£©½øÐÐЩ²»Õý³£²Ù×÷ÈçÊý¾Ý¿âÔÚ¶Áдʱ¶øÎÞ¹ÊÍ£Ö¹Êý¾Ý¿â£¬´Ó¶øµ¼ÖÂSql Server 2005Êý¾Ý¿â²»Õý³£
Öжϣ¬µ±Ôٴδò¿ªÊý¾Ý¿âʱ»á·¢ÏÖijЩÊý¾Ý¿â»á±»±ê¼ÇΪ“¿ÉÒÉ”£¨suspect)£¬¼´ÔÚÊý¾ ......

sqlÖеÄlike


Ö´ÐÐ Êý¾Ý¿â²éѯʱ£¬ÓÐÍêÕû²éѯºÍÄ£ºý²éѯ֮·Ö¡£
Ò»°ãÄ£ºýÓï¾äÈçÏ£º
SELECT ×Ö¶Î from ±í WHERE ij×Ö¶Î Like Ìõ¼þ
ÆäÖйØÓÚÌõ¼þ£¬SQLÌṩÁËËÄÖÖÆ¥Åäģʽ£º
1£¬%£º±íʾÈÎÒâ0¸ö»ò¶à¸ö×Ö·û¡£¿ÉÆ¥ÅäÈÎÒâÀàÐͺͳ¤¶ÈµÄ×Ö·û£¬ÓÐЩÇé¿öÏÂÈôÊÇÖÐÎÄ£¬ÇëÔËÓÃÁ½¸ö°Ù·ÖºÅ£¨%%£©±íʾ¡£
±ÈÈç SELECT * from [user] WHERE u_na ......

oracle PL SQLѧϰ°¸Àý£¨¶þ£©

¡¾ÑµÁ·6.1¡¿¡¡Ê¹ÓÃÒþʽÓαêµÄÊôÐÔ£¬Åж϶ԹÍÔ±¹¤×ʵÄÐÞ¸ÄÊÇ·ñ³É¹¦¡£
²½Öè1£ºÊäÈëºÍÔËÐÐÒÔϳÌÐò£º
BEGIN
  UPDATE emp SET sal=sal+100 WHERE empno=1234;
  IF SQL%FOUND THEN
       DBMS_OUTPUT.PUT_LINE('³É¹¦Ð޸ĹÍÔ±¹¤×Ê£¡');
       ......

oracle PL SQLѧϰ°¸Àý£¨Èý£©

´æ´¢¹ý³Ì
========================================================================== 
========================================================================== 
¡¾ÑµÁ·15.1¡¿  ´´½¨Ò»¸öÏÔʾ¹ÍÔ±×ÜÈËÊýµÄ´æ´¢¹ý³Ì¡£
  ²½Öè1£ºµÇ¼SCOTTÕË»§(»òѧÉú¸öÈËÕË»§)¡£
  ²½Öè2£º ......

SQl 2005 For XMl ¼òµ¥²éѯ(Raw£¬Auto£¬Pathģʽ)(2)

ÎÄÕµ¼º½ SQL Server 2005 ѧϰ±Ê¼ÇϵÁÐÎÄÕµ¼º½
     ÔÚSQl 2005 For XMl ¼òµ¥²éѯ(Raw£¬Auto£¬Pathģʽ)(1) ÀïÎÒÃÇ˵Á˹ØÓÚPath£¬RawºÍAutoģʽµÄÓ÷¨£¬ÆäʵÀïÃæ²»½ö½ö ÊÇÕâЩ¼òµ¥µÄ²Ù×÷£¬»¹ÓÐһЩÆäËüµÄÌØÐÔ£¬±ÈÈç˵Type»òOpenXml·½·¨£¬sp_xml_preparedocument´æ´¢¹ý³Ì µÈÕâЩÔö¼ÓµÄ¶«¶«£¬ÎÒÃÇÀ´Ò» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ