| |

VerySource

 Forgot password?
 Register
Search
View: 1493|Reply: 10

Can I execute multiple SQL statements in ibatis?

[Copy link]

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-2-23 21:00:01
| Show all posts |Read mode
<delete id = "deleteAssetAttachment" parameterClass = "java.lang.String">
     delete from assetattachments
where AssetAttachmentId = # assetAttachmentId #
  </ delete>


 I also want to delete the data of other tables, how to write, can IBATS do this?

 Does not seem sexual. . . .
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-14 09:00:01
| Show all posts
Need to rewrite one
delete
Reply

Use magic Report

0

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-7-21 15:15:01
| Show all posts
Doesn't seem to work
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-13 01:45:01
| Show all posts
With stored procedures, iBatis can call stored procedures to achieve multi-step operations.
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-8-13 08:00:01
| Show all posts
No need
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-13 18:45:01
| Show all posts
An independent sql can only be written in one statement, ibatis is like this, you cannot write the two together.
Reply

Use magic Report

0

Threads

9

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-8-13 19:15:01
| Show all posts
Then write another
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-8-13 20:30:01
| Show all posts
Laziness is sometimes a new creation!
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 Invalid IP Address

 Author| Post time: 2020-8-14 10:30:01
| Show all posts
According to my understanding, it seems that you can write a SQLmap group. I don't know if this function will be added in the future.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-17 13:45:01
| Show all posts
Use a stored procedure! Haha
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list