Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3546371
  • 博文数量: 715
  • 博客积分: 1860
  • 博客等级: 上尉
  • 技术积分: 7745
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-07 08:51
个人简介

偶尔有空上来看看

文章分类

全部博文(715)

文章存档

2023年(75)

2022年(134)

2021年(238)

2020年(115)

2019年(11)

2018年(9)

2017年(9)

2016年(17)

2015年(7)

2014年(4)

2013年(1)

2012年(11)

2011年(27)

2010年(35)

2009年(11)

2008年(11)

最近访客

分类: Oracle

2011-09-09 12:03:50

两种方法:
一种是删除,重建
 
另一种是用负数冲平
  1. -- drop sequence seq;

  2. create sequence seq;
  3. select seq.nextval from scott.emp;
  4. select seq.nextval S from dual; --查出当前值是多少

  5. alter sequence seq increment by -10 minvalue 0; --假设当前值是10,那么用-10来冲平(设置个圈套)

  6. select seq.nextval S from dual; -- 再执行一遍才起作用

  7. alter sequence seq increment by 1; --回归原貌

  8. select seq.nextval S from dual;
 
阅读(2982) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~