truncate table table_name 截断语句,删除掉表中的全部数据,并没有删除表。truncate tabe table_name;truncate table table_name;
2015-06-14
alter table table_name add/modify column_name datatypes;增加字段/修改字段数据类型
alter table table_name drop column column_name ;删除字段
alter table table_name rename column colume_name to new_column_name 修改字段名
rename table_name to new_table_name ;修改表名
alter table table_name drop column column_name ;删除字段
alter table table_name rename column colume_name to new_column_name 修改字段名
rename table_name to new_table_name ;修改表名
2015-06-14
create table userinfo
(id number(6,0),
username varchar2(20),
userpwd varchar2(20),
email varchar2(30),
regdate date,
)
(id number(6,0),
username varchar2(20),
userpwd varchar2(20),
email varchar2(30),
regdate date,
)
2015-06-14
desc drop alter select including contents default temporary datafile tempfile
tablespace 表空间
tablespace 表空间
2015-06-14
alter tablespace tablespace_name add datafile 'xx.dbf' size xx;
alert tablespace tablespace_name drop datafile 'filename.dbf'
alert tablespace tablespace_name drop datafile 'filename.dbf'
2015-06-14
alter tablespace tablespace_name read only | read write (online)
2015-06-14
create tablespace test1_tablespace datafile 'test1file.dbf' size 10m ;
create temporary tablespace temptest1_tablespace tempfile 'temp1file.dbf' size xx ;
dese dba_data_files ;
select dba_data_files where tablespace_name='TEST1_TABLESPACE';
create temporary tablespace temptest1_tablespace tempfile 'temp1file.dbf' size xx ;
dese dba_data_files ;
select dba_data_files where tablespace_name='TEST1_TABLESPACE';
2015-06-14
dese dba_tablespaces;
select tablespace_name from dba_tablespaces;
select tablespace_name from dba_tablespaces;
2015-06-14