当前位置:数据库 > Oracle >>

db2和oracle查询序列区别

db2和oracle查询序列区别
 
DB2中:nextval for sequencename ,prevval for sequencename
 
select nextval for seq_name from sysibm.sysdummy1;
 
select prevval for seq_name from sysibm.sysdummy1;
 
oracle中:sequencename.nextval,sequencename.currval
 
select seq_name.nextval from dual;
 
select seq_name.currval from dual;
 
sysibm.sysdummy1是DB2内存中的一个特殊的表.  www.zzzyk.com  
 
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,