oracle序列
来源:互联网 发布:知乎 唯一住房 编辑:程序博客网 时间:2024/05/12 19:14
/*create sequence name
increment by x //x为增长间隔
start with x //x为初始值
maxvalue x //x为最大值
minvalue x //x为最小值
cycle //循环使用,到达最大值或者最小值时,从新建立对象
cache x //制定缓存序列值的个数
------------------------一个例子-----------------------*/
create sequence for_test --序列名
increment by 1 --每次增加1
start with 1 --从1开始
nomaxvalue --没有最大值
nocache --没有缓存序列
----------------------------创建测试表------------------
create table Test_table
(
TestID int primary key,
TestName varchar2(20) not null,
Tdescription varchar2(200) null
)
-----------------------------使用序列-------------------
insert into Test_table
values(for_test.nextval,'序列测试','这是一个序列使用的例子')
--------------------序列使用结果查询-----------------
select * from Test_table
- Oracle序列
- oracle 序列
- oracle序列
- oracle 序列
- Oracle序列
- Oracle序列
- Oracle 序列
- oracle 序列
- oracle序列
- oracle序列
- Oracle序列
- Oracle 序列
- oracle序列
- oracle 序列
- oracle序列
- Oracle序列
- Oracle-序列
- oracle 序列
- Spring 框架的设计理念与设计模式分析
- Android小游戏-九宫格,有源码的哦!
- swift arch & introduction
- Struts has detected an unhandled exception
- php初始化对象和析构函数的简单实用
- oracle序列
- vc
- 经典英文励志句子
- MFC
- 学习面向对象编程的简单途径
- 二维指针内存的申请和释放(simple,naive ?)
- ssh整合配置(struts2.2.1+ hibernate3.6+spring3.0.5)
- 部分 Do not Know How make ******的原因
- 菜单