知识篇 | 不同于Oracle:SEQUENCE的区别
前言
在使用Oracle数据库SEQUENCE功能时,发现Oracle对边界处理比较奇怪。刚好GreatSQL也支持SEQUENCE,就拿来一起比较一下。
先说结论:GreatSQL 的使用基本和Oracle基本一致,但是对 START WITH 的边界限制有所不同。
本次测试使用数据库的版本号
# Oracle版本<br>BANNER<br>--------------------------------------------------------------------------------<br>Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production<br>PL/SQL Release 11.2.0.4.0 - Production<br>CORE 11.2.0.4.0 Production<br>TNS for Linux: Version 11.2.0.4.0 - Production<br>NLSRTL Version 11.2.0.4.0 - Production<br><br># GreatSQL版本<br>greatsql> \S<br>...<br>Server version: 8.0.32-25 GreatSQL, Release 25, Revision 79f57097e3f<br>...<br>1 row in set (0.00 sec)<br>