Use substitution instead:
<statement id="getFieldList">
show columns from $table$ from $schema$
</statement>
It is in the users guide...
Larry
On Wed, 2 Mar 2005 16:58:58 -0500, Peter Cai <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I used this mapping to get the schema information for a table:
>
>
> <parameterMap id="select-field-para" class="fieldParameter">
> <parameter property="table" />
> <parameter property="schema" />
> </parameterMap>
>
> <statement id="getFieldList" parameterMap="select-field-para">
> show columns from ? from ?
> </statement>
>
>
>
> when I set table="product" schema="jpetstore" in fieldParameter class (both
> schema and table are java String type). I really want a sql statement like
> this
>
> " show columns from product from jpetstore "
>
> But iBATIS will generate a statement like this:
>
> " show columns from 'product' from 'jpetstore' "
>
> So MySQL database always complaint an error.
>
> How to fix it?
>
> Thank you very much!
>
> Peter
>
>