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

Pl/sql ±à³ÌÖ®case whenµÄÓ÷¨

Pl/sql ±à³ÌÖ®case whenµÄÓ÷¨£º£¨t3.LOCAL_BF_KND='111000' -- ±¾Ô»ù±¾ÔÂ×â·Ñ£©
select sum(t1.FAV_FEE) from bi_rw.FO_A_2FAV_M_G t1, bi_rw.D_BILLFEE_KND t3 where t1.BILLFEE_KND=t3.BILLFEE_KND(+) and t3.LOCAL_BF_KND='111000'  --1310557.76
 
Èç¹û²»±ãÓÚ°ÑÌõ¼þt3.LOCAL_BF_KND='111000' дÔÚwhereÌõ¼þÖУ¬ÔòÐèҪʹÓÃcase when ÓïÑÔÀ´ÏÞ¶¨Ìõ¼þ£º
select sum(case when t3.LOCAL_BF_KND='111000' then t1.FAV_FEE else 0 end )    from bi_rw.FO_A_2FAV_M_G t1, bi_rw.D_BILLFEE_KND t3
where t1.BILLFEE_KND = t3.BILLFEE_KND(+) --1310557.76


Ïà¹ØÎĵµ£º

[SQL Server2008]SQL Server ÖÐ.Óë::µÄÇø±ð(ת)

SQL ServerÖе÷Ó÷½·¨Ê±£¬¾­³£Óöµ½.»òÊÇ::Á½ÖÖµ÷Ó÷½·¨£¬ÆäÖÐ. ÊÇʵÀýµ÷Ó÷½·¨£¬::ÊǾ²Ì¬µ÷Ó÷½·¨¡£Èç¹û´ó¼Ò¶ÔC#Óï·¨ÊìϤµÄ»°£¬. ¶ÔÓ¦C#Öе÷ÓÃʵÀý·½·¨£¬:: ¶ÔÓ¦C#ÖеÄstatic·½·¨¡£
ÏÂÃæ¸ø³öÒ»¸öSQL ServerµÄʵÀý£¬ÏÂÃæµÄSQLÔËÐÐÔÚ2008»·¾³Ï£º
DECLARE @g geography;
SET @g = geography::Parse('LINESTRING(-122.360 ......

sqlËø»úÖÆ´óÈ«

ËøµÄ¸ÅÊö ¡¡¡¡Ò». ΪʲôҪÒýÈëËø
¡¡¡¡¶à¸öÓû§Í¬Ê±¶ÔÊý¾Ý¿âµÄ²¢·¢²Ù×÷ʱ»á´øÀ´ÒÔÏÂÊý¾Ý²»Ò»ÖµÄÎÊÌ⣺
¡¡¡¡¶ªÊ§¸üÐÂ
¡¡¡¡A£¬BÁ½¸öÓû§¶ÁͬһÊý¾Ý²¢½øÐÐÐ޸ģ¬ÆäÖÐÒ»¸öÓû§µÄÐ޸Ľá¹ûÆÆ»µÁËÁíÒ»¸öÐ޸ĵĽá¹û£¬±ÈÈ綩Ʊϵͳ
¡¡¡¡Ôà¶Á
¡¡¡¡AÓû§ÐÞ¸ÄÁËÊý¾Ý£¬ËæºóBÓû§ÓÖ¶Á³ö¸ÃÊý¾Ý£¬µ«AÓû§ÒòΪijЩԭÒòÈ¡ÏûÁ˶ÔÊý¾ ......

SQL²Ù×÷È«¼¯

ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓá£
SQL·ÖÀࣺ
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)
DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)
Ê×ÏÈ,¼òÒª½éÉÜ»ù´¡Óï¾ä£º
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE data ......

OracleʹÓü¼Çɼ°PL/SQL DeveloperÅäÖÃ

Õª×Ô£ºhttp://livenzhao.spaces.live.com/blog/cns!6E368BE9F6DDD872!595.entry
·PL/SQL DeveloperʹÓü¼ÇÉ
1¡¢PL/SQL Developer¼ÇסµÇ½ÃÜÂë
ÔÚʹÓÃPL/SQL Developerʱ£¬ÎªÁ˹¤×÷·½±ãÏ£ÍûPL/SQL Developer¼ÇסµÇ¼OracleµÄÓû§ÃûºÍÃÜÂ룻
ÉèÖ÷½·¨£ºPL/SQL Developer 7.1.2 ->tools->Preferences-> ......

SQL Ä£ºý²éѯ

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