在Z上和开放平台上的创建方法还不太一样,两套人马开发出来的就是牛!

蛋疼……

贴不同类型的几个例子感受一下,Z上的ASC,DESC不见了:

CREATE TABLE foo(a INT)
PARTITION BY RANGE (a) (STARTING FROM (1)
ENDING AT (100) EVERY (20))
CREATE TABLE lineitem (
l_orderkey DECIMAL(10,0) NOT NULL,
l_quantity DECIMAL(12,2),
l_shipdate DATE,
l_year_month INT GENERATED ALWAYS AS (YEAR(l_shipdate)*100 + MONTH(l_shipdate)))
PARTITION BY RANGE(l_shipdate)
(STARTING ('1/1/1992') ENDING ('12/31/1992') EVERY 1 MONTH);
CREATE TABLE t(a INT, b INT)
PARTITION BY RANGE(b) (STARTING FROM (1)
EXCLUSIVE ENDING AT (1000) EVERY (100))
CREATE TABLE lineitem2 (
l_orderkey DECIMAL(10,0) NOT NULL,
l_quantity DECIMAL(12,2),
l_shipdate TIMESTAMP,
l_year_month INT GENERATED ALWAYS AS (YEAR(l_shipdate)*100 + MONTH(l_shipdate)))
PARTITION BY RANGE(l_shipdate)
(STARTING ('1992-01-01-00.00.00.000000') ENDING ('1992-12-31-23.59.59.999999') EVERY 1 MONTH)
CREATE TABLE lineitem3 (
l_orderkey DECIMAL(10,0) NOT NULL,
l_quantity DECIMAL(12,2),
l_shipdate TIMESTAMP,
l_year_month INT GENERATED ALWAYS AS (YEAR(l_shipdate)*100 + MONTH(l_shipdate)))
PARTITION BY RANGE(l_shipdate)
(STARTING ('1/1/1992') ENDING ('12/31/1992') EVERY 1 MONTH)
CREATE TABLE sales(invoice_date date, inv_month int NOT NULL
GENERATED ALWAYS AS (month(invoice_date)), inv_year INT NOT
NULL GENERATED ALWAYS AS ( year(invoice_date)),
item_id int NOT NULL,
cust_id int NOT NULL) PARTITION BY RANGE (inv_year,
inv_month)
(PART Q1_02 STARTING (2002,1) ENDING (2002, 3) INCLUSIVE,
PART Q2_02 ENDING (2002, 6) INCLUSIVE,
PART Q3_02 ENDING (2002, 9) INCLUSIVE,
PART Q4_02 ENDING (2002,12) INCLUSIVE,
PART CURRENT ENDING (MAXVALUE, MAXVALUE));
CREATE TABLE foo(a INT)
PARTITION BY RANGE(a)
(STARTING FROM (1) ENDING AT (100),
STARTING FROM (201) ENDING AT (300))

DB2 create partitioned table的更多相关文章

  1. DB2 create tablespace

    db2手工创建表空间 db2 v10.11.1 创建系统管理使用文件目录的表空间 db2 "create tablespace newtbs01 managed by system usin ...

  2. How To Convert A Partitioned Table To A Non-Partitioned Table Using DataPump In 11g (Doc ID 1276049.1)

    How To Convert A Partitioned Table To A Non-Partitioned Table Using DataPump In 11g (Doc ID 1276049. ...

  3. ORA-14404: partitioned table contains partitions in a different tablespace

    SQL> drop tablespace nn_data including contents and datafiles; drop tablespace nn_data including ...

  4. when create a table,then show error ora-00952 tablespace tsb_1 not exist

    QUESTION:When create a table,then show error ora-00952 tablespace tsb_1 not exist. STEP: 1.select us ...

  5. IDEA的SonarLint插件报错Unable to create symbol table for

    执行sonarLint 报错: Unable to create symbol table for ***File won't be refreshed because there were erro ...

  6. SonarQube执行代码分析时,报错ERROR: Unable to create symbol table for : /**/*.java java.lang.IllegalArgumentException: Unsupported class file major version 55

    若要转载本文,请务必声明出处:https://www.cnblogs.com/zhongyuanzhao000/p/11686633.html 起因: 最近正在尝试SonarQube的简单使用,但是当 ...

  7. ORA-31633:unable to create master table "DP.SYS_EXPORT_FULL_11" ORA-01658

    问题描述:在进行数据泵进行数据库备份的时候,但是导出命令报错,环境是19C 4节点的rac 一体机.目前磁盘空间需要清理,清理之前先备份一下数据库 ORA-31626:job does not exi ...

  8. db2 xml 转 table【XQuery系列】

    版本号:DB2 Version 9.1 1.创建測试表,初始化数据 create table emp (doc XML);   INSERT INTO EMP VALUES ('<dept bl ...

  9. db2 xml 转 table

    版本:DB2 Version 9.1 1.创建测试表,初始化数据 create table emp (doc XML); INSERT INTO EMP VALUES ('<dept bldg= ...

随机推荐

  1. Javascript高级程序设计——函数

    函数Function 通过函数封装多条语句,在任何地方执行.javascript函数不会重载,相同名字函数,名字属于后定义的函数通过function关键词声明. function functionNa ...

  2. Code First01---CodeFirst项目的搭建

    Entity Framework支持Database First.Model First和Code Only三种开发模式,各模式的开发流程大相径庭,开发体验完全不一样.三种开发模式各有优缺点,对于程序 ...

  3. iOS开发——UI进阶篇(十一)应用沙盒,归档,解档,偏好设置,plist存储,NSData,自定义对象归档解档

    1.iOS应用数据存储的常用方式XML属性列表(plist)归档Preference(偏好设置)NSKeyedArchiver归档(NSCoding)SQLite3 Core Data 2.应用沙盒每 ...

  4. BZOJ1483——[HNOI2009]梦幻布丁

    1.题目大意:这题就是给你一个序列,有两个操作,一个是询问序列中的连续段数,比如序列 1 2 2 1就是三段.. 1是一段,2 2 又是一段,1又是一段,就是相同的在一起,第二个操作就是将其中的一种数 ...

  5. [codeforces 339]D. Xenia and Bit Operations

    [codeforces 339]D. Xenia and Bit Operations 试题描述 Xenia the beginner programmer has a sequence a, con ...

  6. 16 BasicHashTable基本哈希表类(三)——Live555源码阅读(一)基本组件类

    这是Live555源码阅读的第一部分,包括了时间类,延时队列类,处理程序描述类,哈希表类这四个大类. 本文由乌合之众 lym瞎编,欢迎转载 http://www.cnblogs.com/oloroso ...

  7. 转: Annovar 软件注释流程介绍

    第一步:下载Annovar 上Annovar官网下载(http://annovar.openbioinformatics.org/en/latest/user-guide/download/),现在要 ...

  8. 1.4---字符串空格变成20%(CC150)

    import CtCILibrary.AssortedMethods; public class Question { // Assume string has sufficient free spa ...

  9. 3. Android程序生成步骤

      主要流程如下图所示:       所需要的工具列表 名称 功能介绍 在操作系统中的路径 aapt Android资源打包工具 ${ANDROID_SDK_HOME}/platform-tools/ ...

  10. IDEA 新建文件默认加入CVS

    是要先add,不过可以设置创建的文件都默认 add的.修改默认值看下图:打开系统设置,找到 Version Control 设置选项: 在 When files are created 选项中选择第二 ...