list partition of Oracle partition table

Source: Internet
Author: User

Sql> --Create Test TableSql> Drop Tablelist_partition_test;TableDroppedsql> Create Tablelist_partition_test2  (  3Empno Number(4),  4EnameVARCHAR2(Ten),  5JobVARCHAR2(9),  6Mgr Number(4),  7hiredate DATE,8Sal Number(7,2),  9Comm Number(7,2), TenDeptno Number(2),  OneDtVARCHAR2( -)  A  )  -Partition bylist (DT) -  (  thePartition dt_partitionValues('20180512','20180513','20180514','20180515')  -  );TableCreatedsql> --Add DataSql> begin  2     forIinch 20180512..20180515Loop3    Insert  intoList_partition_testSelectT.*, I fromScott.emp t; 4    EndLoop; 5  End; 6  /PL/Sqlproceduresuccessfully completedsql> --filter queries with partitioned fieldsSql> Select *  2     fromlist_partition_test3   whereDt= '20180515'; EMPNO ename JOB MGR hiredate SAL COMM DEPTNO DT----- ---------- --------- ----- ----------- --------- --------- ------ -------------------- 7369SMITH Clerk7902 1980/ A/ -     800.00                - 20180515 7499ALLEN salesman7698 1981/2/ -     1600.00    300.00      - 20180515 7521WARD salesman7698 1981/2/ A     1250.00    500.00      - 20180515 7566JONES MANAGER7839 1981/4/2      2975.00                - 20180515 7654MARTIN salesman7698 1981/9/ -     1250.00   1400.00      - 20180515 7698BLAKE MANAGER7839 1981/5/1      2850.00                - 20180515 7782CLARK MANAGER7839 1981/6/9      2450.00               Ten 20180515 7788SCOTT ANALYST7566 1987/4/ +     3000.00                - 20180515 7839KING President1981/ One/ -    5000.00               Ten 20180515 7844TURNER salesman7698 1981/9/8      1500.00      0.00      - 20180515 7876ADAMS Clerk7788 1987/5/ at     1100.00                - 20180515 7900JAMES Clerk7698 1981/ A/3      950.00                - 20180515 7902FORD ANALYST7566 1981/ A/3     3000.00                - 20180515 7934MILLER Clerk7782 1982/1/ at     1300.00               Ten 20180515 -Rows selected

list partition of Oracle partition table

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.