select * from your_tb where to_number(your_field1,'99999999') between 1 and 10000;

解决方案 »

  1.   

    create table users(
      username varchar2(20) not null,
      passwd  varchar2(10) not null,
      name varchar2(20) not null,
      groupname varchar(20) not null,
      chinaid number(8) not null,
      http  varchar2(30) not null,
      post varchar2(30) not null,
      descript varchar2(200) not null ,
      constraint PK_USERS primary key (username)
    )
    partition by range(to_number(username,'99999999'))
    (
      partition users01 values less than (100000) tablespace us1,
      partition users02 values less than (200000) tablespace us2,
      partition users03 values less than (300000) tablespace us3,
      partition users04 values less than (400000) tablespace us4,
      partition users05 values less than (5000000) tablespace us5,
      partition users06 values less than (MAXVALUE) tablespace us6
    );
      

  2.   

    先看一看:
    create table users(
      userid number not null,
      username varchar2(20) not null,
      passwd  varchar2(10) not null,
      name varchar2(20) not null,
      groupname varchar(20) not null,
      chinaid number(8) not null,
      http  varchar2(30) not null,
      post varchar2(30) not null,
      descript varchar2(200) not null ,
      constraint PK_USERid primary key (userid)
    )
      

  3.   

    详细说一说你的需求和使用下面语句的理由,
    partition by range(to_number(username,'99999999'))
    (
      partition users01 values less than (100000) tablespace us1,
      partition users02 values less than (200000) tablespace us2,
      partition users03 values less than (300000) tablespace us3,
      partition users04 values less than (400000) tablespace us4,
      partition users05 values less than (5000000) tablespace us5,
      partition users06 values less than (MAXVALUE) tablespace us6
    );
      

  4.   

    这么少的记录,没有必要分区,
    要分区,记录在1000万以上才有比较明显的优势你也可以采用hash分区
      

  5.   

    http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a85397/statem3e.htm#2062835
      

  6.   

    create table users(
      username varchar2(20) not null,
      passwd  varchar2(10) not null,
      name varchar2(20) not null,
      groupname varchar(20) not null,
      chinaid number(8) not null,
      http  varchar2(30) not null,
      post varchar2(30) not null,
      descript varchar2(200) not null ,
      constraint PK_USERS primary key (username)
    )
    partition by range(username)
    (
      partition users01 values less than ('100000') tablespace us1,
      partition users02 values less than ('200000') tablespace us2,
      partition users03 values less than ('300000') tablespace us3,
      partition users04 values less than ('400000') tablespace us4,
      partition users05 values less than ('500000') tablespace us5,
      partition users06 values less than (MAXVALUE) tablespace us6
    );
      

  7.   

    bird93(大嘴鹦鹉) :
    您好:
       上面的用法可行吗?
       不知您是否试过!
       等您回音!
      

  8.   

    各位朋友,小弟近日正在学习oracle,由于授课教师水平不高,所以学习没有多大进展,本人想请各位朋友帮我找一些oracle的电子文档或幻灯片,以助我学习提高,小弟感激不尽.来信请发:
    [email protected]
      

  9.   

    以下在oracle816测试通过
      1  create table users_1(
      2    username varchar2(20) not null,
      3    passwd  varchar2(10) not null,
      4    name varchar2(20) not null,
      5    groupname varchar(20) not null,
      6    chinaid number(8) not null,
      7    http  varchar2(30) not null,
      8    post varchar2(30) not null,
      9    descript varchar2(200) not null ,
     10    constraint PK_USERS primary key (username)
     11  )
     12  partition by range(username)
     13  (
     14    partition users01 values less than ('100000') tablespace users,
     15    partition users02 values less than ('200000') tablespace users,
     16    partition users03 values less than ('300000') tablespace users,
     17    partition users04 values less than ('400000') tablespace users,
     18    partition users05 values less than ('500000') tablespace users,
     19    partition users06 values less than (MAXVALUE) tablespace users
     20* )
    SQL> /表已建立.SQL> drop table users_1;表已删除.