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

sql_map_config.xml(SQL Map»·¾³Îļþ)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
 "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
 <!-- ÅäÖúÍÓÅ»¯SQL Map½âÎöʵÀýµÄÉ趨 -->
 <settings cacheModelsEnabled="true" //SQL MapÔËÐÐʱʵÀýµÄ»º´æModelÊÇ·ñ¿ªÆô
     enhancementEnabled="true" //È«¾ÖÐÔµÄÆôÓûò½ûÓÃ×Ö½ÚÂëÔöÇ¿£¬ÒÔÓÅ»¯·ÃÎÊPOJO±äÁ¿ÊôÐԵŦÄÜ
        lazyLoadingEnabled="true" //³Ö¾Ã»¯Êý¾ÝÊÇ·ñÑÓ³Ù¼ÓÔØ
     maxRequests="32" //ͬʱִÐÐsqlÓï¾äµÄ×î´óÐÐÊý
     maxSessions="10" //ͬһʱ¼äÄڻµÄ×î´óSessionÊý¡£ËùνµÄSession¾ÍÊÇÒ»¸öÇëÇó»òÒ»¸öSQL MapÔËÐÐʱʵÀý×Ô¶¯»ñµÃµÄ»á»°
        maxTransactions="5" //Öƶ¨ÁË×î´óÊÂÎñ´¦ÀíµÄÏß³ÌÊý
     useStatementNamespaces="true" />//Öƶ¨ÁËÔÚSQL MapÓ³ÉäÎļþÖÐÊÇ·ñÓÃÈ«ÏÞ¶¨ÃûÀ´ÒýÓÃÓ³ÉäÉùÃ÷
 <!-- ÅäÖÃÁ¬½Ó -->
 <transactionManager type="JDBC" >
  <dataSource type="SIMPLE">
   <property name="JDBC.Driver" value="oracle.jdbc.OracleDriver"/>
   <property name="JDBC.ConnectionURL"
    value="jdbc:oracle:thin:@localhost:1521:orcl"/>
   <property name="JDBC.Username" value="system"/>
   <property name="JDBC.Password" value="abcd"/>
   <!-- ×î´óÁ¬½ÓÊý -->
   <property name="Pool.MaximumActiveConnections" value="10"/>
  </dataSource>
 </transactionManager>
 <!-- SQL MapÓ³ÉäÎļþµÄÈ¡µÃ… -->
 <sqlMap resource="fw_student_SqlMap.xml" />
</sqlMapConfig>


Ïà¹ØÎĵµ£º

SQLÖÐCaseµÄʹÓ÷½·¨(ÉÏƪ)


Case¾ßÓÐÁ½ÖÖ¸ñʽ¡£¼òµ¥Caseº¯ÊýºÍCaseËÑË÷º¯Êý¡£
--¼òµ¥Caseº¯Êý
CASE sex
WHEN '1' THEN 'ÄÐ'
WHEN '2' THEN 'Å®'
ELSE 'ÆäËû' END
--CaseËÑË÷º¯Êý
CASE WHEN sex = '1' THEN 'ÄÐ'
WHEN sex = '2' THEN 'Å®'
ELSE 'ÆäËû' END
ÕâÁ½ÖÖ·½Ê½£¬¿ÉÒÔʵÏÖÏàͬµÄ¹¦ÄÜ¡£¼òµ¥Caseº¯ÊýµÄд·¨ ......

[SQL Server] ÈÕÖ¾¹ÜÀí(´ýÐø)

 --±¸·ÝÊÂÎñÈÕÖ¾ (×ÔÉÏÒ»´Î±¸·ÝÒÔÀ´£¬ÖÁµ±Ç°µÄÒÑÍê³ÉµÄÊÂÎñµÄÈÕÖ¾)
backup log MyDBName to disk='F:\dbbak\GamePoint\MyDBName_log_2010052709.bak';
 
--½Ø¶ÏÈÕÖ¾(½Ø¶Ïµôµ±Ç°µÄÒÑÍê³ÉµÄÊÂÎñµÄÈÕÖ¾), SQL Server 2005, 2008ûÓÐÕâ¸öÑ¡Ïî.
backup log MyDBName with no_Log;
 
--ÊÕËõÈÕÖ¾(ÖÁ1M,µ ......

SQLÂÒÂëµÄÎÊÌâ

ÔÚSQL   Server   Unicode×Ö·û´®³£Á¿ÐèҪǰ׺N  
   
  µ±ÔÚSQL  
SERVERÀï±ß´¦Àí×Ö·û´®³£Á¿µÄʱºòÄã±ØÐëÔÚ³£Á¿Ö®Ç°·ÅÒ»¸ö´óдµÄN,¾ÍÏñSQL  
SERVERÁ¬»úÎĵµ±êÌâΪ"²ÉÓÃUnicodeÊý¾Ý"Ëù˵Ã÷µÄÄÇÑù.Nǰ׺ÏóÕ÷×ÅÔÚSQL-92  
±ê×¼µÄ¹ú¼ÒÓïÑÔ,²¢ÇÒ±ØÐëÊÇ´óд×Öĸ.Èç¹ûÄãÔ ......

Àí½âSQL ServerÖеÄË÷Òý£¨Ò»£©

¶ÔÓںܶàDBAºÍ³ÌÐòÔ±À´Ëµ£¬SQL ServerÖеÄË÷Òý²»ÊÇÒ»¸öÄ°ÉúµÄÊÂÎÎÒÃÇÉõÖÁÿÌ춼ÔÚʹÓÃËü£¬¶ÔÓÚÄÄЩÇé¿öÏÂÓ¦¸Ã´´½¨Ë÷Òý¶¼ÄÜÒ»Ò»µÄµÀ³ö£¬²»¹ýÓпÉÄÜÎÒÃDz¢Ã»ÓÐ×ÐϸȥÏëËüµÄ¾ßÌåÔ­Àí£¬±¾ÎĽ«¸ù¾ÝÎÒ¶ÔSQL ServerÖеÄË÷ÒýµÄÀí½â×öÒ»¸ö¼òµ¥µÄ×ܽáºÍ¸ÅÊö£¬Ï£Íû¶Ô´ó¼ÒÄÜÓÐËù°ïÖú£¨Ïêϸ¿É²Î¿¼¡¶SQL Server 2005 Implementation an ......

Çå¿ÕSQL ServerÊý¾Ý¿âÖÐËùÓбíÊý¾ÝµÄ·½·¨

Æäʵɾ³ýÊý¾Ý¿âÖÐÊý¾ÝµÄ·½·¨²¢²»¸´ÔÓ£¬ÎªÊ²Ã´ÎÒ»¹Òª¶à´ËÒ»¾ÙÄØ£¬Ò»ÊÇÎÒÕâÀï½éÉܵÄÊÇɾ³ýÊý¾Ý¿âµÄËùÓÐÊý¾Ý£¬ÒòΪÊý¾ÝÖ®¼ä¿ÉÄÜÐγÉÏ໥ԼÊø¹Øϵ£¬É¾³ý²Ù×÷¿ÉÄÜÏÝÈëËÀÑ­»·£¬¶þÊÇÕâÀïʹÓÃÁË΢ÈíδÕýʽ¹«¿ªµÄsp_MSForEachTable´æ´¢¹ý³Ì¡£
¡¡¡¡Ò²ÐíºÜ¶à¶ÁÕßÅóÓѶ¼¾­Àú¹ýÕâÑùµÄÊÂÇ飺ҪÔÚ¿ª·¢Êý¾Ý¿â»ù´¡ÉÏÇåÀíÒ»¸ö¿Õ¿â£¬µ«ÓÉÓÚ¶ÔÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ