---
title: "Using Ibatis 1"
author: "zerostar88"
date: "2009-06-21T21:19:15Z"
tags: ["Apache", "SQL", "XML", "iBATIS"]
categories: ["企业架构"]
slug: "using-ibatis-1"
draft: false
lastmod: "2009-06-21T21:39:42Z"
id: 412542
url: "https://jeffyding.iteye.com/blog/412542"
---

1.mapping file: site.xml \[code="xml"] Select SITEID,ITEMNAME,ITEMVALUE from siteConfig update siteConfig set ITEMVALUE=#itemvalue# where SITEID = #siteid# and ITEMNAME=#itemname# insert into siteConfig(SITEID,ITEMNAME,ITEMVALUE) values(#siteid#,#itemname#,#itemvalue#) insert into siteConfig(ITEMNAME,ITEMVALUE) values(#itemname#,#itemvalue#) insert into siteConfig(SITEID,ITEMNAME,ITEMVALUE) values(#siteID#,#itemName#,#itemValue#) insert into siteConfig(SITEID,ITEMNAME,ITEMVALUE) values(?,?,?) delete from siteConfig where siteID = #siteid# \[/code] 2. employee.xml \[code="xml"] Select * from Employee \[/code]