B*n
12 楼
In oracle:
suppose you already have a table EMP(name Varchar2(30), salary Number);
and you want to add a column called 'id', just do:
SQL> ALTER TABLE EMP ADD (id Number);
if you now want to populate this id column from 1 to the number of existing
employees in the EMP table, just do:
SQL> UPDATE EMP SET id = rownum;
To rename table 'EMP' to 'EMPLOYEE', just do:
SQL> RENAME EMP TO EMPLOYEE;
【在 as 的大作中提到】
: 建好一个TABLE之后,可以再加一列吗?
: 可以改这个TABLE的名字吗?
suppose you already have a table EMP(name Varchar2(30), salary Number);
and you want to add a column called 'id', just do:
SQL> ALTER TABLE EMP ADD (id Number);
if you now want to populate this id column from 1 to the number of existing
employees in the EMP table, just do:
SQL> UPDATE EMP SET id = rownum;
To rename table 'EMP' to 'EMPLOYEE', just do:
SQL> RENAME EMP TO EMPLOYEE;
【在 as 的大作中提到】
: 建好一个TABLE之后,可以再加一列吗?
: 可以改这个TABLE的名字吗?
相关阅读
如何实现DB底层的功能?mysql 一问so cold here.Who ever used " reference manager" before? I'd use your expertise.How can I find source code about this?Oracle Education VersionAccess一问, HELPwhat is Microsoft SQL server 's version number?数据库跟你走[转载] access问题请教请问sql server7 中 updatetext的用法,在asp中如何使用Question我们要培训什么?帮帮忙请问Oracle Application Server 4.0是什么时候发布的请问谁知道ADABAS-D是什么东西database 初级问题求教pb6.0的打印问题.(头都大了)what textbook is good for database ah?ODBC to Drive SQL on Text Files?[转载] help database question