当前位置: 首页 > news >正文

phpcmsv9蓝色简洁下载网站模板wordpress搭建电商

phpcmsv9蓝色简洁下载网站模板,wordpress搭建电商,如何做网站seo韩小培,wordpress 展示微博不同于Oracle#xff1a;SEQUENCE的区别 前言 在使用Oracle数据库SEQUENCE功能时#xff0c;发现Oracle对边界处理比较奇怪。刚好GreatSQL也支持SEQUENCE#xff0c;就拿来一起比较一下。 先说结论#xff1a;GreatSQL 的使用基本和Oracle基本一致#xff0c;但是对 ST…不同于OracleSEQUENCE的区别 前言 在使用Oracle数据库SEQUENCE功能时发现Oracle对边界处理比较奇怪。刚好GreatSQL也支持SEQUENCE就拿来一起比较一下。 先说结论GreatSQL 的使用基本和Oracle基本一致但是对 START WITH 的边界限制有所不同。 本次测试使用数据库的版本号 # Oracle版本 BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production PL/SQL Release 11.2.0.4.0 - Production CORE 11.2.0.4.0 Production TNS for Linux: Version 11.2.0.4.0 - Production NLSRTL Version 11.2.0.4.0 - Production# GreatSQL版本 greatsql \S ... Server version: 8.0.32-25 GreatSQL, Release 25, Revision 79f57097e3f ... 1 row in set (0.00 sec)SEQUENCE 使用介绍 SEQUENCE 有以下几个常用的参数 参数名介绍START WITH起始值INCREMENT BY步长MINVALUE/NOMINVALUE最小值MAXVALUE/NOMAXVALUE最大值CYCLE/NOCYCLE是否回收CACHE/NOCACHEcache性能好但有丢数据的风险 INCREMENT BY 怎么用 INCREMENT BY 的值大于0时为递增序列 INCREMENT BY 的值小于0时为递减序列 何时能使用NOMINVALUE NOMINVALUE INCREMENT BY的值大于0时递增序列可以用NOMAXVALUEINCREMENT BY的值小于0时递减序列可以用NOMINVALUE。 To create a sequence that increments without bound, for ascending sequences, omit the MAXVALUE parameter or specify NOMAXVALUE. For descending sequences, omit the MINVALUE parameter or specify the NOMINVALUE. CYCLE/NOCYCLE 如果是CYCLE当序列的值超出设定的范围时会从最大值/最小值开始重新进行循环。 递增数列从最小值开始循环递减数列从最大值开始循环。 oracle CREATE SEQUENCE seq1 START WITH 101 minvalue 100 INCREMENT BY -10 MAXVALUE 130 nocacheCYCLE;#多次执行 oracle select seq1.nextval from dual; #返回值依次为 101-130-120-110100Oracle SEQUENCE 特性 START WITH 边界 默认情况下是认为 MINVALUE START WITH MAXVALUE超出区间就不能创建SEQUENCE START WITH比MINVALUE小创建失败 oracle create SEQUENCE MY_FIRST_SEQUENCE start with -2 increment by -1 minvalue 1 maxvalue 100 nocycle nocache; 2 3 4 5 6 7 create SEQUENCE MY_FIRST_SEQUENCE * ERROR at line 1: ORA-04006: START WITH ???? MINVALUESTART WITH比MAXVALUE大 oracle create SEQUENCE MY_SECOND_SEQUENCE start with 101 increment by -1 minvalue 1 maxvalue 100 nocycle nocache; 2 3 4 5 6 7 create SEQUENCE MY_SECOND_SEQUENCE * ERROR at line 1: ORA-04008: START WITH ???? MAXVALUE特殊情况 在使用SEQUENCE的时候发现有两种特殊情况 一 、当INCREMENT BY 0 处于递减数列时 递减数列START WITH 比 MINVALUE小1 的时候SEQUENCE 还能正常创建 oracle create SEQUENCE MY_FIRST_SEQUENCE start with -2 increment by -1 minvalue -1 maxvalue 100 nocycle nocache;2 3 4 5 6 7 Sequence created.但是SEQUENCE 是 NOCYCLE创建后不能使用 oracle select MY_FIRST_SEQUENCE.nextval from dual;select MY_FIRST_SEQUENCE.nextval from dual* ERROR at line 1: ORA-08004: ?? MY_FIRST_SEQUENCE.NEXTVAL goes below MINVALUE ?????START WITH 比MINVALUE小太多就不能创建了 oracle create SEQUENCE MY_FIRST_SEQUENCE start with -3 increment by -1 minvalue -1 maxvalue 100 nocycle nocache; 2 3 4 5 6 7 create sequence MY_FIRST_SEQUENCE * ERROR at line 1: ORA-04006: START WITH ???? MINVALUEoracle drop SEQUENCE MY_FIRST_SEQUENCE;Sequence dropped.oracle create SEQUENCE MY_FIRST_SEQUENCE start with 101 increment by -1 minvalue 1 maxvalue 100 nocycle nocache; 2 3 4 5 6 7 create sequence MY_FIRST_SEQUENCE * ERROR at line 1: ORA-04008: START WITH ???? MAXVALUEoracle create sequence MY_FIRST_SEQUENCE start with -1 increment by -1 minvalue 1 maxvalue 100 nocycle nocache; 2 3 4 5 6 7 create sequence MY_FIRST_SEQUENCE * ERROR at line 1: ORA-04006: START WITH ???? MINVALUE二、当INCREMENT BY 0 处于递增数列时 递增数列时情况相反 START WITH比MAXVALUE大1就能创建 oracle create sequence MY_FIRST_SEQUENCE start with 101 increment by 1 minvalue 1 maxvalue 100 nocycle nocache; 2 3 4 5 6 7 Sequence created.但是 SEQUENCE 为 NOCYCLE创建后不能使用 oracle select MY_FIRST_SEQUENCE.nextval from dual; select MY_FIRST_SEQUENCE.nextval from dual* ERROR at line 1: ORA-08004: ?? MY_FIRST_SEQUENCE.NEXTVAL exceeds MAXVALUE ?????sequence Specify the name of the sequence to be created. The name must satisfy the requirements listed in “Database Object Naming Rules”. If you specify none of the clauses INCREMENT BY through GLOBAL, then you create an ascending sequence that starts with 1 and increases by 1 with no upper limit. Specifying only INCREMENT BY -1 creates a descending sequence that starts with ‐1 and decreases with no lower limit. To create a sequence that increments without bound, for ascending sequences, omit the MAXVALUE parameter or specify NOMAXVALUE. For descending sequences, omit the MINVALUE parameter or specify the NOMINVALUE. To create a sequence that stops at a predefined limit, for an ascending sequence, specify a value for the MAXVALUE parameter. For a descending sequence, specify a value for the MINVALUE parameter. Also specify NOCYCLE. Any attempt to generate a sequence number once the sequence has reached its limit results in an error. To create a sequence that restarts after reaching a predefined limit, specify values for both the MAXVALUE and MINVALUE parameters. Also specify CYCLE. GreatSQL 特性 GreatSQL 的使用就比较严格了 MINVALUE START WITH MAXVALUE 没发现像Oracle那样的特殊情况 greatsql create sequence MY_FIRST_SEQUENCE- start with -1- increment by 1- minvalue 1- maxvalue 100- nocycle- nocache; ERROR 8582 (HY000): create sequence failed, cause START WITH should between MINVALUE and MAXVALUE! greatsql create sequence MY_FIRST_SEQUENCE- start with 101- increment by 1- minvalue 1- maxvalue 100- nocycle- nocache; ERROR 8582 (HY000): create sequence failed, cause START WITH should between MINVALUE and MAXVALUE! greatsql create sequence MY_FIRST_SEQUENCE- start with 102- increment by 1- minvalue 1- maxvalue 100- nocycle- nocache; ERROR 8582 (HY000): create sequence failed, cause START WITH should between MINVALUE and MAXVALUE! greatsql create sequence MY_FIRST_SEQUENCE- start with 101- increment by -1- minvalue 1- maxvalue 100- nocycle- nocache; ERROR 8582 (HY000): create sequence failed, cause START WITH should between MINVALUE and MAXVALUE! greatsql create sequence MY_FIRST_SEQUENCE- start with -1- increment by -1- minvalue 1- maxvalue 100- nocycle- nocache; ERROR 8582 (HY000): create sequence failed, cause START WITH should between MINVALUE and MAXVALUE! greatsql create sequence MY_FIRST_SEQUENCE- start with 0- increment by -1- minvalue 1- maxvalue 100- nocycle- nocache; ERROR 8582 (HY000): create sequence failed, cause START WITH should between MINVALUE and MAXVALUE! greatsql drop sequence MY_FIRST_SEQUENCE; ERROR 1046 (3D000): No database selected greatsql create sequence MY_FIRST_SEQUENCE- start with -10- increment by -1- minvalue -9- maxvalue 100- nocycle- nocache; ERROR 8582 (HY000): create sequence failed, cause START WITH should between MINVALUE and MAXVALUE! 总结 GreatSQL 和 Oracle 对 START WITH 的边界定义基本一致都是 MINVALUE START WITH MAXVALUE但是 Oracle 会有两个特殊情况。 相关文档 SEQUENCE Oracle文档 https://docs.oracle.com/en/database/oracle/oracle-database/23/sqlrf/CREATE-SEQUENCE.html#GUID-E9C78A8C-615A-4757-B2A8-5E6EFB130571 https://docs.oracle.com/en/database/oracle/oracle-database/23/sqlrf/Sequence-Pseudocolumns.html GreatSQL SEQUENCE文档 https://greatsql.cn/docs/8032-25/user-manual/5-enhance/sql-compat/5-3-easyuse-ora-syntax-sequence.html ORA-04013,CACHE 值必须小于CYCLE值解决方案 https://www.cnblogs.com/PingPo/p/14312384.html
http://www.pierceye.com/news/743820/

相关文章:

  • 个人做电影网站有什么风险招聘网站制作公司
  • 安徽网站推广公司网站集群建设参数
  • 个人网站做哪种能赚钱网站维护有哪些企业
  • 专题类的网站郴州全网推广公
  • 流行用什么做网站手机响应式网站
  • 绍兴网站建设 微德福如何填写网站开发验收单
  • php 创建网站开发中山如何建设网站
  • 莱芜企业建站公司申请微信公众号
  • 手机网站 html5上海网站开发怎么做
  • 精密科技东莞网站建设ppt简约大气模板
  • 一家专做特卖的网站seo推广优化方案
  • 南沙门户网站建设监理工程师成绩在建设部哪个网站查
  • 做视频网站需要什么证件wordpress从
  • 算卦网站开发京东慧采入驻条件及费用2023年
  • 网站建设好后如何提交搜索引擎公共网络建设指导书
  • 做网站最快多久DW怎么做电商网站
  • 论坛模板网站建设鞍山市信息网站
  • 微网站的定义商城小程序开发报价
  • 做一网站要什么软件wordpress support hls player
  • 青岛网站制作服务装饰设计素描
  • 物流网站公司站外调用WordPress评论
  • 免费的行情网站下载安装拍艺术照
  • 佛山网站设计多少钱兴国做网站
  • 自己可以做网站生意好做吗手机制作音乐的软件app
  • 国土政务网站建设制度下载购物app
  • 阿里云一键建站网站网站前端浏览器兼容如何做
  • 如何看一个网站的备案在哪里做的多媒体资源库网站建设
  • 店铺推广软件广州推广优化
  • 做读书笔记的网站wordpress主题miku
  • 淘掌门官方网站wordpress注册验证邮箱验证