1.select * from cat;
2.alter table tbname add colname coltype;
3.???

解决方案 »

  1.   

    补充:
    2、修改alter table tablename modify(colname1 coltype1,colname2 coltype2);
       插入alter table tablename add(colname1 coltype1,colname2 coltype2);3、放到哪里都可以,只要你get时能找到,默认为安装目录下的bin文件夹下
      

  2.   

    1,  select * from cat查出的都是系统自带的表和视图,我怎么查出我自己建的呢?我自己只建   了个表,现在想看看是哪5个,怎么看?(我的用户名/密码:system/password);
    2.  插入alter table tablename add(colname1 coltype1,colname2 coltype2);其中        colname2 coltype2是????
      

  3.   

    1,select * from user_tables;
    2.colname2  --列名
      coltype2  --数据类型
      

  4.   

    而且我用alter table 表 drop column 列 删除列的时候,老是报错:ORA-12988:无法删除属于SYS的表中的列,我用SYS登陆也是报这个错误。
      

  5.   

    哦,这样插入的列都是放在了最后,如果我要想把插入的列放在第1列怎么办?还有,在ORACLE中我怎么查看命令的帮助呀?
      

  6.   

    修改alter table tablename modify(colname1 coltype1,colname2 coltype2);只能修改数据类型,如果我想修改列名怎么办?
      

  7.   

    ORACLE版难道连回答这种问题的人都没有吗?小弟很失望哦~~~
      

  8.   

    不要用系统的用户,这样很难和系统表区分自己创建一个用户,分配一个表空间
    create user temp identified by temp default tablespace sp01;
    grant connect,resource to temp;
    connect temp/temp
    create table ...
    ...
    select * from cat;
      

  9.   

    插入alter table tablename add(colname1 coltype1,colname2 coltype2);这样插入的列都是放在了最后,如果我要想把插入的列放在第1列怎么办?
        修改alter table tablename modify(colname1 coltype1,colname2 coltype2);只能修改数据类型,如果我想修改列名怎么办?
      

  10.   

    我記得好像不可以用alter改变列名!
      

  11.   

    补充:
      3. 查找就可以啦~
     
      运行脚本的话,就是 @+文件名.
      SQL>@C:\RunSql.sql;
      

  12.   

    1. select * from tab;
      

  13.   

    9.2好象可以这样改:
    alter table t_name rename column column_a to column_b ;
    //大概是这样吧,不好意思,没有9i没法试