建synonym 可以让其他用户不加用户名也能访问当前用户建的表,不过还必须赋权。建表的时候用TABLESPACE关键字指定表空间。

解决方案 »

  1.   

    1.alter table table_name owner to user1;
    2.在建用户时default tablespace = yourtablespace
      

  2.   

    1、首先建立表空间——tablespace1
    2、建用户test1,设置该用户的表空间默认值为tablespace1
      

  3.   

    奋进2005 同志
    alter table table_name owner to user1;
    语句是在什么版本下运行的?我的是9i 不能运行
      

  4.   

    oracle 建表的完整语法,schema就是用户名了。
    CREATE TABLECreate a table.Syntax:   CREATE [GLOBAL TEMPORARY] TABLE [schema.]table 
          column datatype [DEFAULT expr] [column_constraint(s)]
         [,column datatype [,...]]
            table_constraint
               table_ref_constraint
                  [ON COMMIT {DELETE|PRESERVE} ROWS]
                     storage_options  [COMPRESS int|NOCOMPRESS]
                    [LOB_storage_clause][varray_clause][nested_storage_clause] [XML_type_clause]
                        Partitioning_clause
                           [[NO]CACHE] [[NO]ROWDEPENDENCIES] [[NO]MONITORING] [PARALLEL parallel_clause]
                              [ENABLE enable_clause | DISABLE disable_clause]
                                 {ENABLE|DISABLE} ROW MOVEMENT
                                    [AS subquery]   CREATE [GLOBAL TEMPORARY] TABLE [schema.]table 
          column datatype [DEFAULT expr] [column_constraint(s)] [,column datatype [,...]]
            table_constraint
               table_ref_constraint
                  [ON COMMIT {DELETE|PRESERVE} ROWS]
                     CLUSTER cluster_name (col1, col2,... )
                    [LOB_storage_clause][varray_clause][nested_storage_clause] [XML_type_clause]
                        Partitioning_clause
                           [[NO]CACHE] [[NO]ROWDEPENDENCIES] [[NO]MONITORING] [PARALLEL parallel_clause]
                              [ENABLE enable_clause | DISABLE disable_clause]
                                 {ENABLE|DISABLE} ROW MOVEMENT
                                    [AS subquery]   CREATE [GLOBAL TEMPORARY] TABLE [schema.]table 
          column datatype [DEFAULT expr] [column_constraint(s)] [,column datatype [,...]]
            table_constraint
               table_ref_constraint
                  [ON COMMIT {DELETE|PRESERVE} ROWS]
                     ORGANIZATION {HEAP [storage_options] [COMPRESS int|NOCOMPRESS]
                                  | INDEX idx_organized_tbl_clause
                                  | EXTERNAL external_table_clause }
                    [LOB_storage_clause][varray_clause][nested_storage_clause] [XML_type_clause]
                        Partitioning_clause
                           [[NO]CACHE] [[NO]ROWDEPENDENCIES] [[NO]MONITORING] [PARALLEL parallel_clause]
                              [ENABLE enable_clause | DISABLE disable_clause]
                                 {ENABLE|DISABLE} ROW MOVEMENT
                                    [AS subquery]   CREATE TABLE [schema.]table OF XMLTYPE [XML_type_clause]storage_options:
       PCTFREE int
       PCTUSED int
       INITTRANS int
       MAXTRANS int
       STORAGE storage_clause
       TABLESPACE tablespace
       [LOGGING|NOLOGGING]idx_organized_tbl_clause:
       storage_option(s) 
       {MAPPING TABLE | NOMAPPING}
       [PCTTHRESHOLD int]
       [COMPRESS int|NOCOMPRESS]
       [ [INCLUDING column_name] OVERFLOW [storage_option(s)] ]nested_storage_clause:
       NESTED TABLE {nested_item | COLUMN_VALUE}
          [ [ELEMENT] IS OF TYPE (ONLY type) ]] |  [ [NOT] SUBSTITUTABLE AT ALL LEVELS ]] 
          STORE AS storage_table 
             [RETURN AS {LOCATOR|VALUE} ]XML_type_clause:
       [XMLTYPE [COLUMN] column [STORE AS OBJECT RELATIONAL] ]
           [[XMLSCHEMA xmlschema_URL] ELEMENT {element |xmlschema_URL#element}]   [XMLTYPE [COLUMN] column [STORE AS CLOB LOB_Segname (LOB_Params)]]
           [[XMLSCHEMA xmlschema_URL] ELEMENT {element |xmlschema_URL#element}]   [XMLTYPE [COLUMN] column [STORE AS CLOB LOB_Params] ]
           [[XMLSCHEMA xmlschema_URL] ELEMENT {element |xmlschema_URL#element}]external_table_clause:
       ([TYPE access_driver_type]
          DEFAULT DIRECTORY directory [ACCESS PARAMETERS {USING CLOB subquery | (opaque_format_spec) }]
             LOCATION (directory:'location_specifier' [,directory2:'location_specifier2'...)
             ) [REJECT LIMIT {int|UNLIMITED}]Missing from this page are the options for creating OBJECT TABLES - see the Oracle docs for this.Examplescreate table SIMPLE (MY_NUM number primary key);create table COPY_OF_EMP as 
    select * from EMP;create table EMPTY_COPY as 
    select * from EMP where 1 = 0;
    create table ACCOUNTS(
    AC_ID_PK number primary key,
    AC_STATUS number,
    AC_COUNTRY_ID number default 44,
    AC_CREATED date default sysdate, 
    AC_ACCOUNT varchar2(50)

    tablespace DATA; 
    create table SALES(
    SA_ID_PK number primary key,
    SA_PRODUCT_ID number not null,
    SA_DATE_PART date not null,
    SA_COST number (12,2) not null
    )
    partition by range (SA_DATE_PART) (
    partition P01_JAN values less than (to_date('2005-02-01','yyyy-mm-dd')),
    partition P02_FEB values less than (to_date('2005-03-01','yyyy-mm-dd')),
    partition P03_MAR values less than (to_date('2005-04-01','yyyy-mm-dd')),
    partition P04_APR values less than (to_date('2005-05-01','yyyy-mm-dd')), 
    partition P05_REST values less than (maxvalue) 
    );