自增? 需要写在触发器里吧? 改成存储过程就能返回了,但是不能直接写SQL了.
解决方案 »
- 帮我修改下sql语句
- 百分请教,with子句可以用在Oracle存储过程中吗
- 请高手写个简单的PL/SQL中存储过程(有输入参数/输出参数)
- 关于oracle中 动态sql
- 为什么我建了用户后看不到方案?
- 联通公司的收费系统是用的oracle吗?
- 如何用c++连接oracle数据库?
- 在linux上安装oracle9,一定要把那三个oracle压缩文件烧到cd上再装吗?不能直接用硬盘上的装?
- 安装时 提示加载数据库时出错 areas queries?请帮忙。。。
- 多表连接取最大级的问题,Oralce的细节问题与SQL Server不同,解决就送分
- 数据库发布问题
- 急救!!!Oracle8 执行Exp出错,出错信息为:EXP-0002,导出文件时出错,如何解决?
如:
Create table tablename
( no number(10),
name varchar2(12));Create sequence id_seq
start with 1
increment by 1;insert into tablename(no,name)
value(id_seq.nextval,"张三");insert语句之后能否返回序列?
create or replace trigger tr_xcsg_bh
before insert on xcsg
for each row
declare
-- local variables here
newbh number;
begin
select xcsg_id.nextval into newbh from dual;
:new.bh := newbh;
end tr_xcsg_bh;