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

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ºÍSQL serverµÄÊý¾ÝÀàÐͱȽÏ


ÀàÐÍÃû³Æ
Oracle
SQLServer
±È½Ï
×Ö·ûÊý¾ÝÀàÐÍ
CHAR
CHAR
¶¼Êǹ̶¨³¤¶È×Ö·û×ÊÁϵ«oracleÀïÃæ×î´ó¶ÈΪ2kb£¬SQLServerÀïÃæ×î´ó³¤¶ÈΪ8kb
±ä³¤×Ö·ûÊý¾ÝÀàÐÍ
VARCHAR2
VARCHAR
OracleÀïÃæ×î´ó³¤¶ÈΪ4kb£¬SQLServerÀïÃæ×î´ó³¤¶ÈΪ8kb
¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¹Ì¶¨³¤¶È×Ö·û´®
NCHAR
NCHAR
Ç°Õß×î´ó³¤¶È2kbºóÕß×î´ó³¤¶È4 ......

ÔÚpythonÖд¦ÀíXML×ܽá

±¾ÎÄ×ܽáÁËÔÚPythonÖÐÖ÷ÒªµÄ¼¸ÖÖ´¦ÀíXMLµÄ·½·¨£º
Element Tree
SAX
Dom
ʹÓõÚÈý·½Àà¿âÈçAmara 2.x£¬ libxml2dom µÈ
Element Tree
Element TreeÊÇPython 2.5ÒýÈëµÄʹÓüòµ¥£¬¿ì½ÝµÄ´¦Àí·½·¨£¬ Ò²ÊÇPython±ê×¼Àà¿âÍƼöµÄ´¦ÀíXMLµÄ·½·¨¡£
ËüʹÓÃÊ÷ÐνڵãµÄÐÎʽÀ´¶ÁдXML¡£Element TreeÊÇÇáÁ¿¼¶µÄDOM£¬ ËùÒÔÊ ......

SQL server2005ÖÐÎļþ±¸·ÝÓë»Ö¸´

±¸·Ý
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 ......

[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 like %% ÓÅ»¯ÓëÇø±ð

¶à×Ö¶ÎÄ£ºý²éѯ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%'
µ«µ±ÆäÖÐÒ»×ֶΠ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ