1. 创建序列dept_id_seq,开始值为200,每次增长10,最大值为10000 a) create sequence dept_id_seq b) start with 200 c) increment by 10 d) maxvalue 10000 2. 使用序列向表dept中插入数据 a) insert into dept01 b) values(dept_id_seq.nextval,'Account') 附: create table dept as select department_id id,department_name name from departments where 1=2
65. 创建序列: 1). create sequence hs increment by 10 start with 10 2). NEXTVAL 应在 CURRVAL 之前指定 ,二者应同时有效 65. 序列通常用来生成主键: INSERT INTO emp2 VALUES (emp2_seq.nextval, 'xx', ...) 总结: what -- why -- how 表table 视图view 序列sequence 索引index 同义词synonym