ibatis executes multiple select statements at a time

Updated on technology 2024-03-26
17 answers
  1. Anonymous users2024-02-07

    As long as you can ensure that the fields in table c are the same every time this statement is executed, then modify it like this.

    select , from lybbs_author aouthror , blog_users users , tablename$ c where

    and = and =

    Just pass your table name in the form of a variable tablename and you're good to go.

  2. Anonymous users2024-02-06

    As long as you can save the fields in Table C the same every time this statement is executed, then tune it this way.

    select , from lybbs_author aouthror , blog_users users , tablename$ c where

    and = and =

    Just pass in the name of your table as a variable tablename.

  3. Anonymous users2024-02-05

    Basically agree with the upstairs, I would like to add that the parameter should be in the form of tablename, and $tablename$ is used in hibernet or ibatis in the form of "". And if you need to follow some conditions after where, it's best to use map to pass parameters. The above is complete.

  4. Anonymous users2024-02-04

    Upstairs is right, update first and then select, but you can't nest update statements between them, so you can only call them twice but you can use batch processing.

  5. Anonymous users2024-02-03

    Update first, then select, you can use batch operations.

  6. Anonymous users2024-02-02

    I've tried, but it didn't work, so I'm looking for a high finger as well, but if it's pure ibatis.

    private sqlmapclient sqlmap ;

    public void dosomething(Argument 1, argument 2 throws sqlexception finally.)

    Of course, if you have Spring, you can also combine Spring's iBacatis helper class to operate, and in the new Ibatis version, everything has been handed over to Spring, but it's pretty much the same.

  7. Anonymous users2024-02-01

    No, I remember that 2 SQL can be executed in mybatis, and ibatis should also be able to. The return value in the first SQL statement can be executed as a condition in the second SQL statement.

    select seqno from table where ..for update

    update table set seqno = seqno+1

  8. Anonymous users2024-01-31

    You run the following SQL statement in the database to see how much data is returned.

  9. Anonymous users2024-01-30

    Pass the value from your DAO layer. Because it is multiple variables, it is necessary to use map to transmit it.

    ibatis configuration file writes:

    select * from eadept ea where in (#id1##id2##id3##id4#

    The inside of the DAO layer is encapsulated with map:

    id1","001008");

    id2","001009");

    id3","001010");

    id4","001007");

    Then just pass the map over. Try it! Hope it helps!

  10. Anonymous users2024-01-29

    The documentation on the official website has instructions.

    select * from t_blog where id in#

  11. Anonymous users2024-01-28

    This one doesn't work! Because you're executing multiple statements at the same time! You can only execute it when you do it one by one! Or you can just fix the wrong SQL statement!

  12. Anonymous users2024-01-27

    Yes! The others succeeded!

    I see what you mean.

    It's the statement. go statement.

    go statement. Right? Only the one that reported the error didn't succeed! Others, if the prompt is successful, it's a success!

    It's best to get into the habit of first checking and then triangulation hehe.

  13. Anonymous users2024-01-26

    If you don't judge, if you don't have a rollback then the execution is successful.

  14. Anonymous users2024-01-25

    It is the same as the SQL configuration of a single statement, except that when receiving the return, it is received with a list.

  15. Anonymous users2024-01-24

    You have to execute the two separately and independently, or the two execute together can't stick the ** together!

    And you didn't post **, it's hard to judge.

  16. Anonymous users2024-01-23

    Are they not in a ** segment, a transaction? begin 。。end? commit ?

  17. Anonymous users2024-01-22

    Yes, I don't know your specific situation, how to judge.

Related questions
11 answers2024-03-26

You have been deeply hurt by love, and you want to protect yourself. >>>More

6 answers2024-03-26

Song title: Can you accompany me one more time.

Singer: Wang Yawen. >>>More

29 answers2024-03-26

It is difficult to distinguish between right and wrong, and the truth is difficult to understand. People's hearts are separated from their stomachs, you have only known each other for 1 year, and these troubles have happened, I really don't know what will happen in the future. I'm not a complaining person, but I've been hurt myself, and I really feel that in this materialistic society, there are very few good girls, either pretentious, or vanity, if there is a little bit of a girl, then it is even more abnormal self, sincere love and marriage are vulnerable in the face of money, desire and vanity. >>>More

29 answers2024-03-26

Why don't you think about it, your decision is too light, there is a sentence called even the courage to die Are you still afraid of living, you are indeed too selfish, now you are alone It is very painful, but after you leave, it will bring pain to everyone around you who cares about you, do you just want to give them the pain, if you really love her and understand her, you must also know that she doesn't want you to be like this, she wants you to live well, and wants to see you happy. You don't know how much people want to live again, but God doesn't give them a chance, don't you know how important your chance to be born is to them, don't be stupid, no matter how difficult it is, you have to live, for all those who care and love you, and to live happily is their greatest comfort.

27 answers2024-03-26

1. In vitro deworming of adult dogs.

After the dog becomes an adult, it is divided into two ways in Qucheng, liver and in vitro, that is to say, physical strength and taste are prone to some parasites, especially in vitro deworming, which must be carried out frequently, because when the dog goes out to walk the dog every day, it will be easy to go to the grass, or play with other dogs, then it is easy to appear some parasites, especially in summer, it is a period when these parasites appear more, so maggots should be more frequent, generally speaking, once a month or so. >>>More