序列
创建序列
create sequence 序列名
定义递增步长,默认为1
increment by {1|n}
指定起始值,默认为1
start with n
指定最大值同最小值
maxvalue n|nomaxvalue
达到最大最小值是否循环
cycle|nacycle
是否在内存中预分配一定数量的序列值进行缓存
cache n|nocache
指出是否确保按照请求顺序生成序列号
order|noorder;
查看
select ...
from ...;
插入
insert into
修改
alter
删除
drop
表
增加
alter table ...add...
删除
alter table...drop
更改
insert into...values
查询
select *from...
where...
重命名
rename ...;
alter table...;
添加注释
comment on table 表名 is...;
comment on column 表名.列名 is...;
约束
列级约束
表级约束
添加约束
删除约束
约束状态
索引和视图
创建索引
create index 索引名
on 表名
tablespace 表空间名|default
reverse;
位图索引
create bitmap index ...;
其他同表
创建视图
create view 视图名
as select 语句
with {read only|check option};