当前位置:   article > 正文

关于各种语言中if .........else....是什么意思!_if else表达式翻译

if else表达式翻译

if....else的意思是:如果if下面的这个条件不成立的话、那就执行else这个条件、

 

比如:if 这个‘降序’条件不成立的话、那就执行‘升序’这个条件、另外begin..end、这个是开始跟结束的意思、开始执行下面这2个条件、然后结束,有多少个begin 就有多少个end.

  1. begin                                     --存储过程开始
  2. declare @strtemp varchar(300)                       
  3. declare @strsql varchar(5000)             --该存储过程最后执行的语句 
  4. declare @strordertype varchar(1000)    --排序类型语句order by column asc
  5. begin
  6. if @bitordertype=1                                        --降序
  7. begin
  8. set @strordertype='order by'+@asccolumn+'ASC'
  9. set @strtemp='<(select min'
  10. end
  11. else                                                      --升序
  12. begin
  13. set @strordertype='order by'+@asccolumn+'asc'
  14. set @strtemp='>(select max'
  15. end
  16. end

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/101403
推荐阅读
相关标签
  

闽ICP备14008679号