当前位置:网站首页>postgresql 语句
postgresql 语句
2022-06-11 03:14:00 【谷满满】
IF 条件语句
- IF ... THEN...END IF;
- IF ... THEN ... ELSE...END IF;
- IF ... THEN ... ELSEIF ... THEN ... END IF;
- IF ... THEN ... ELSEIF ... THEN ... ELSE...END IF;
LOOP 循环语句
1、使用 IF 退出循环
Loop
逻辑块
IF… THEN
EXIT ;
END IF;
END LOOP;
2、使用 WHEN 退出循环
LOOP
EXIT WHEN 条件;
CONTINUE WHEN 后续逻辑不执行直接进入下一迭代的条件;
逻辑块
END LOOP;3、使用 CONTINUE 此次后续逻辑不执行直接进入下一迭代
LOOP
CONTINUE WHEN 条件;
逻辑块
END LOOP;
WHILE 循环
WHILE 条件 LOOP
逻辑块
END LOOP;
FOR 循环
FOR 对一定范围的整数数值进行迭代的循环
1、从小到大迭代
FOR item_int IN 1..10 LOOP
逻辑块
END LOOP;2、从大到小迭代
FOR item_int IN REVERSE 10..1 LOOP
逻辑块
END LOOP;注意:如果下界大于上界(或者是在 REVERSE 情况下是小于),那么循环体将完全不被执行。而且不会抛出任何错误。
边栏推荐
- How to ensure reliable delivery of messages?
- Visit the swagger times unable to infer base url
- SQL | 游戏行业部分指标
- A simple understanding of C language array
- Windows10 installing keras
- TimeHelper
- Go language advantages and learning Roadmap
- postgresql源码学习(十八)—— MVCC③-创建(获取)快照
- OPPO K9试水“捆绑销售”,消费者“赚了”还是“亏了”?
- Array full permutation
猜你喜欢
随机推荐
[cloud native] what is micro service? How to build it? Teach you how to build the first micro service (framework)
@Controller @transactional @service annotation is invalid and less dependent
WinDbg virtual machine dual machine debugging driver file debugging
Vocabulary Construction -- code completion fast food tutorial (3) - word segmentation
Troubleshooting of single chip microcomputer communication data delay
{dataSource-1} closing ... {dataSource-1} closed
pip 安装 qt5 。
Database design specification
R bioinformatics statistical analysis
How should Xiaobai start the Amazon self support evaluation?
马志强:语音识别技术研究进展和应用落地分享丨RTC Dev Meetup
LaTex环境下在TexStudio中使用minted插入高亮代码
B_QuRT_User_Guide(19)
Solr initialization failure: requesthandler INIT failure
音乐正版率关键数据缺失,网易云音乐IPO胜算几何?
. Net module and assembly - NET Module vs Assembly
潮玩力真火力!年轻人第一台巨幕影院?酷开电视Max 86“庞然来袭
Visit the swagger times unable to infer base url
File file = new File(“test.txt“)文件路径
LVGL中文字体制作








