Is is possible to use more than one sql query in one mapping tag ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Is is possible to use more than one sql query in one mapping tag ?

Haim Schindler
is this possible:

<insert id="insertMe" ...>

   insert into table1 (id, title) values (20, ${value});

   insert into table2 (id, title, field3) values (120, ${value}, 43);

   insert into table3(id, title, field3) values (120, ${value}, 43);

</insert>
Reply | Threaded
Open this post in threaded view
|

Re: Is is possible to use more than one sql query in one mapping tag ?

Larry Meadors
It depends on your environment. Try it.

On Sun, Jun 26, 2011 at 5:55 AM, haim <[hidden email]> wrote:

> is this possible:
>
> <insert id="insertMe" ...>
>
>   insert into table1 (id, title) values (20, ${value});
>
>   insert into table2 (id, title, field3) values (120, ${value}, 43);
>
>   insert into table3(id, title, field3) values (120, ${value}, 43);
>
> </insert>
Reply | Threaded
Open this post in threaded view
|

Re: Is is possible to use more than one sql query in one mapping tag ?

Jackie Li
Hi,

It's possible. I have been using a combination of select before.

Cheers,
Jackie

Sent from my iPad

On Jun 26, 2011, at 9:00 PM, Larry Meadors <[hidden email]> wrote:

> It depends on your environment. Try it.
>
> On Sun, Jun 26, 2011 at 5:55 AM, haim <[hidden email]> wrote:
>> is this possible:
>>
>> <insert id="insertMe" ...>
>>
>>   insert into table1 (id, title) values (20, ${value});
>>
>>   insert into table2 (id, title, field3) values (120, ${value}, 43);
>>
>>   insert into table3(id, title, field3) values (120, ${value}, 43);
>>
>> </insert>