建立自增长序列后,再建一个触发器,然后就什么都出不来了,打回车都是空白,为什么呢?是不是还需要写其他的什么呢?感谢!
建序列代码
-- Create sequence
create sequence anumbercount
minvalue 1
maxvalue 999999999999
start with 1
increment by 1
nocache;建触发器代码
create or replace trigger bef_ins_author
before insert on author
referencing old as old new as new for each row
begin
select anumbercount.nextval into :new.anumber from dual;
end;
建序列代码
-- Create sequence
create sequence anumbercount
minvalue 1
maxvalue 999999999999
start with 1
increment by 1
nocache;建触发器代码
create or replace trigger bef_ins_author
before insert on author
referencing old as old new as new for each row
begin
select anumbercount.nextval into :new.anumber from dual;
end;
解决方案 »
- 用sql实现求两字符串的公共子串(有测试数据)
- oracle ORA-01008: 并非所有变量都已绑定
- 如何通过数据库文件进行oracle数据库恢复
- 一个对我来说很难的问题????创建数据库的问题 真的很难
- 我的oracle安装不上了,求救,急呀``我以前没用过oracle。咋这么难用呀
- ORACLE中建立的表有什么方法能够使两个表建立关联
- 求助下载Developer 2000
- ★★★★★如何在pro*c中insert或者update BLOB类型字段!★★★★★
- 万分紧急!!!!!!先谢过!
- 推送数据时 ora-03315问题
- 可能有多处错误。请帮忙看下
- (急切求助)如何把PL/SQL中的表结构及备注信息导出到Excel或HTML文件(在线等)
2 idx int;
3 begin
4 idx:=1;
5 loop
6 if(idx > i) then
7 exit;
8 end if;
9
10 dbms_output.put_line(idx*idx);
11 idx:=idx+1;
12
13 end loop;
14 end;
15 /过程已创建。