MySQL flow control function

1. The
first parameter of IF is the conditional expression, the second parameter is the value when the conditional expression is true, and the third parameter is the value when the conditional expression is false.
Insert picture description here
Two, CASE

  1. Implement the switch statement in java.
    Insert picture description here
  2. Realize
    if...
    else if...
    else... in java
    Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_40315481/article/details/104173402