没有create domain语句
alter table add (col1 datatype);

解决方案 »

  1.   

    没有对域操作。
    增新列如:alter table your_tb add(your_field,varchar2(20));
      

  2.   

    我是刚刚开始学习!
    谢谢了,增加新列我用了很好!
    那在sql*plus中怎样才能自定义类型呢?
      

  3.   

    Example I
    The following example creates object type PERSON_T with LOB attributes: CREATE TYPE person_t AS OBJECT
      (name CHAR(20),
       resume CLOB,
       picture BLOB);
    Example II
    The following statement creates MEMBERS_TYPE as a VARRAY type with 100 elements: CREATE TYPE members_type AS VARRAY(100) OF CHAR(5);
    Example III
    The following example creates a named table type PROJECT_TABLE of object type PROJECT_T: CREATE TYPE project_t AS OBJECT 
      (pno CHAR(5), 
       pname CHAR(20), 
       budgets DEC(7,2));CREATE TYPE project_table AS TABLE OF project_t;
    Example IV
    The following example invokes method constructor COL.GETBAR(): CREATE TYPE foo AS OBJECT (a1 NUMBER,  
                      MEMBER FUNCTION getbar RETURN NUMBER,
                      pragma RESTRICT_REFERENCES(getbar, WNDS, WNPS)); 
    CREATE TABLE footab(col foo); SELECT col.getbar() FROM footab;