Conditional statement, which is a kind of statement that chooses to execute according to the condition in the program, the difficulty lies in how to abstract the condition accurately in the actual use of such statement. For example, to implement the
In front of you to explain a multi-choice ElseIf statement, although this statement can make a variety of judgments, but when used, need to write a lot of if statements, to our program readability inconvenience, in order to avoid the IF statement
We have to do not only write SQL, but also to write good performance of SQL statements.(1) Select the most efficient table name order (valid only in the rule-based optimizer):The Oracle parser processes the table names in the FROM clause in a
Source: http://www.imooc.com/code/1355If the multiple if statement is not satisfied with condition 1, the condition 2 is judged, and the code within the Else block is executed when the preceding conditions are not true. For example, if the test
Java programming those things 31 -- If statement syntax (1) Zhengzhou game institute Chen yuefeng from: http://blog.csdn.net/mailbomb
5.3 condition statementsConditional statements are a type of statements that are selected and executed based on the
1. Java If statement1,if statement if (condition) {statement;}if (condition) {statement 1;}else{statement 2;}2, multiple If-else statement if (condition 1) {statement 1;}else if (condition 2) {statement 2;}else{statement;}2, go if statement For
MyBatis's dynamic SQL is based on the OGNL expression, which helps us to implement some logic in SQL statements conveniently.The elements used to implement dynamic SQL in MyBatis are:
If
Choose (when,otherwise)
Trim
where
Java programming those things 32-If statement syntax (2) Zhengzhou game college Chen yuefeng from: http://blog.csdn.net/mailbomb
5.3.1.2 if-else statementIf-else statements implement closed conditions, which are more common in programs. The else
In life, we often need to make judgments before deciding whether to do something. For example, if your test score is greater than 90, reward an IPHONE 5S. You can use the if condition statement to implement situations where you need to determine the
SQL statement optimization improves database performance and SQL statement database performance
In systems with unsatisfactory performance, apart from the fact that the application load exceeds the server's actual processing capacity, it is more
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.