XML Element: include

This is used to include a predefined SQL segment into a query at any place. It supports the following -

Key

Relation Type

Purpose

refid

Attribute

The ID of the SQL fragment that needs to be placed at the position where the include element is positioned within the parent query.


The following code segment is a sample definition:

<select id="DEFAULT_SELECT" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT 1 FROM DUAL WHERE 1=1
<include refid="FILTER_CLAUSE" />
</select>