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>
Ïà¹ØÎĵµ£º
ǰÑÔ
×î½ü½ÓÁ¬Óöµ½¼¸¸öÅóÓÑÎÊÎÒͬһ¸öÎÊÌ⣬¾ÍÊǹØÓÚ.NETƽ̨ÉÏORM¿ò¼ÜµÄÑ¡Ôñ¡£ÎÒÏëÔÚÕâ¸ö½²ÇóЧÂʵÄʱ´ú£¬ËÒ²²»ÏëÊÖдSQL»ò´æ´¢¹ý³ÌÈ¥·ÃÎÊÊý¾Ý¿âÁË¡£´ó¼Ò¶¼ÖªµÀ£¬ÔÚJavaƽ̨ÉÏ£¬ORMÕâÒ»¿é»ù±¾ÊÇHibernateµÄÌìÏ¡£µ±È»£¬Ïà¶ÔÇáÁ¿¼¶µÄiBatisÒ²Óв»´íµÄ±íÏÖ¡£
&nb ......
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
create procedure [dbo].[MachiningPayedGetListByCondition]
@CustomerName varchar(50),
@CustomerPhone varchar(50),
@PactNumber varchar(50),
@Ispay bit
as
begin
set nocount on;
SELECT
dp.ID as 'MachiningPayed/@ID',
&nbs ......
SOURCE: CLICK HERE
±¾ÎĽ²ÊöSQL Server¡¢Oracle¡¢MySQL²é³öֵΪNULLµÄÌæ»»¡£
ÔÚSQL Server Oracle MySQLµ±Êý¾Ý¿âÖвé³öijֵΪNULLÔõô°ì?
1¡¢MSSQL: ISNULL()
Óï·¨
ISNULL ( check_expression , replacement_value )
²ÎÊý
check_expression
½«±»¼ì²éÊÇ·ñΪ NULLµÄ±í´ïʽ¡£check_expression ¿ÉÒÔÊÇÈκÎÀàÐ͵ġ£
re ......
--±¸·ÝÊÂÎñÈÕÖ¾ (×ÔÉÏÒ»´Î±¸·ÝÒÔÀ´£¬ÖÁµ±Ç°µÄÒÑÍê³ÉµÄÊÂÎñµÄÈÕÖ¾)
backup log MyDBName to disk='F:\dbbak\GamePoint\MyDBName_log_2010052709.bak';
--½Ø¶ÏÈÕÖ¾(½Ø¶Ïµôµ±Ç°µÄÒÑÍê³ÉµÄÊÂÎñµÄÈÕÖ¾), SQL Server 2005, 2008ûÓÐÕâ¸öÑ¡Ïî.
backup log MyDBName with no_Log;
--ÊÕËõÈÕÖ¾(ÖÁ1M,µ ......
"SQL Server ²»´æÔÚ»ò·ÃÎʱ»¾Ü¾ø "
Õâ¸öÊÇ×ÔÓµÄ,´íÎó·¢ÉúµÄÔÒò±È½Ï¶à,ÐèÒª¼ì²éµÄ·½ÃæÒ²±È½Ï¶à.
Ò»°ã˵À´,ÓÐÒÔϼ¸ÖÖ¿ÉÄÜÐÔ:
1,SQL ServerÃû³Æ»òIPµØÖ·Æ´Ð´ÓÐÎó
2,·þÎñÆ÷¶ËÍøÂçÅäÖÃÓÐÎó
3,¿Í»§¶ËÍøÂçÅäÖÃÓÐÎó
Òª½â¾öÕâ¸öÎÊÌâ,ÎÒÃÇÒ»°ãÒª×ñÑÒÔϵIJ½ÖèÀ´Ò»²½²½ÕÒ³öµ¼Ö´íÎóµÄÔÒò.
= ......