fw_student_SqlMap.xml(SQL ºÍVOµÄÓ³ÉäÎļþ)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="fw_student">
<resultMap class="com.sias.Student" id="student">
<result column="name" property="name" jdbcType="VARCHAR2"/>
<result column="sex" property="sex" jdbcType="VARCHAR2"/>
</resultMap>
<select id="Select" resultMap="student">//±»SqlMapClientÀàµÄList queryForList(String)·½·¨µ÷ÓÃ
select name,sex from fw_student
</select>
<insert id="insert" parameterClass="com.sias.Student">//±»SqlMapClientÀàµÄ void insert(String,Object)·½·¨µ÷ÓÃ
insert into fw_student(name,sex) values(#name:VARCHAR2#,#sex:VARCHAR2#)
</insert>
<update id="update" parameterClass="java.util.Map">//±»SqlMapClientÀàµÄ void update(String,Map)·½·¨µ÷ÓÃ
update fw_student cm set name='chang'
<isPropertyAvailable property="n">//Èç¹ûMap.put(String,value)ÖдæÔÚ±äÁ¿n(String="n"),ÔòʹÓÃWhere name=n;
where name='$n$'
</isPropertyAvailable>
</update>
</sqlMap>
ÕâÀïÐèҪ˵Ã÷µÄÊÇ$ºÍ#·ûºÅµÄÓ÷¨£º
ÀýÈç±äÁ¿MÊÇ×Ö·û´®ÀàÐÍ,ÔòÓ¦¸ÃÓÃ'$M$'»òÕß#M#,Èç¹ûÊÇintÐÍ£¬ÔòÓÃ$M$»ò#M#
Ïà¹ØÎĵµ£º
ÀàÐÍÃû³Æ
Oracle
SQLServer
±È½Ï
×Ö·ûÊý¾ÝÀàÐÍ
CHAR
CHAR
¶¼Êǹ̶¨³¤¶È×Ö·û×ÊÁϵ«oracleÀïÃæ×î´ó¶ÈΪ2kb£¬SQLServerÀïÃæ×î´ó³¤¶ÈΪ8kb
±ä³¤×Ö·ûÊý¾ÝÀàÐÍ
VARCHAR2
VARCHAR
OracleÀïÃæ×î´ó³¤¶ÈΪ4kb£¬SQLServerÀïÃæ×î´ó³¤¶ÈΪ8kb
¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¹Ì¶¨³¤¶È×Ö·û´®
NCHAR
NCHAR
Ç°Õß×î´ó³¤¶È2kbºóÕß×î´ó³¤¶È4 ......
±¾ÎÄ×ܽáÁËÔÚPythonÖÐÖ÷ÒªµÄ¼¸ÖÖ´¦ÀíXMLµÄ·½·¨£º
Element Tree
SAX
Dom
ʹÓõÚÈý·½Àà¿âÈçAmara 2.x£¬ libxml2dom µÈ
Element Tree
Element TreeÊÇPython 2.5ÒýÈëµÄʹÓüòµ¥£¬¿ì½ÝµÄ´¦Àí·½·¨£¬ Ò²ÊÇPython±ê×¼Àà¿âÍƼöµÄ´¦ÀíXMLµÄ·½·¨¡£
ËüʹÓÃÊ÷ÐνڵãµÄÐÎʽÀ´¶ÁдXML¡£Element TreeÊÇÇáÁ¿¼¶µÄDOM£¬ ËùÒÔÊ ......
±¸·Ý
BACKUP DATABASE mydb
TO DISK='c:\olddb.bak'
WITH INIT
--ΪÁ˲âÊÔ£¬°Ñ±¸·ÝºÃµÄÎļþ´ÓCÅÌÒƶ¯µ½D:\tempdb Îļþ¼Ð
--»¹Ô
--1.ÓôËÓï¾äµÃµ½±¸·ÝÎļþµÄÂß¼ÎļþÃû£º
RESTORE FILELISTONLY from DISK = N'd:\tempdb\olddb.bak' --±¸·ÝÎļþ´æ·Å·¾¶
--¿´LogicalName£¬Ò»°ã»áÓÐÁ½¸öÎļþ,È磺
--olddb &nbs ......
--±¸·ÝÊÂÎñÈÕÖ¾ (×ÔÉÏÒ»´Î±¸·ÝÒÔÀ´£¬ÖÁµ±Ç°µÄÒÑÍê³ÉµÄÊÂÎñµÄÈÕÖ¾)
backup log MyDBName to disk='F:\dbbak\GamePoint\MyDBName_log_2010052709.bak';
--½Ø¶ÏÈÕÖ¾(½Ø¶Ïµôµ±Ç°µÄÒÑÍê³ÉµÄÊÂÎñµÄÈÕÖ¾), SQL Server 2005, 2008ûÓÐÕâ¸öÑ¡Ïî.
backup log MyDBName with no_Log;
--ÊÕËõÈÕÖ¾(ÖÁ1M,µ ......
¶à×Ö¶ÎÄ£ºý²éѯsql like %% ÓÅ»¯ÓëÇø±ð
http://anforen.5d6d.com/
SELECT *
from [KLims].[dbo].[Task]
where ClientCompany like '%a%' or [Address] like '%a%'
SELECT *
from [KLims].[dbo].[Task]
where ClientCompany + [Address] like '%a%'
µ«µ±ÆäÖÐÒ»×ֶΠ......