oracle中的自动增长
create table test(
id int not null primary key,
name varchar2(20),
sex int)
;
create sequence t ->创建squence,命名为t
minvalue 1 ->最小值
maxvalue 100000 ->最大值
start with 1 ->从1开始
increment by 1 ->增长比例
nocache ->增长池,为了提高效率,可以设置为 cache 10
;
insert into test values(t.nextval,'zhangyi'23);
原文地址:http://www.cnblogs.com/zhangyi85/archive/2008/09/15/1290927.html
oracle中的自动增长的更多相关文章
- Oracle中的自动增长字段
Oracle中的自动增长字段 Oracle 中不像MYSQL 和MSSQLServer 中那样指定一个列为自动增长列的方式,不过在Oracle中可以通过SEQUENCE序列来实现自动增长字段. 在Or ...
- 在oracle中创建自动增长字段
参考http://www.cnblogs.com/jerrmy/archive/2013/03/13/2958352.html http://www.jb51.net/article/43382.ht ...
- Mysql,SqlServer,Oracle主键自动增长的设置
1.把主键定义为自动增长标识符类型 MySql 在mysql中,如果把表的主键设为auto_increment类型,数据库就会自动为主键赋值.例如: )); insert into customers ...
- oracle 主键自动增长
oracle 主键自动增长 2009-12-11 16:07:00| 分类: 数据库资料|字号 订阅 这几天搞Oracle,想让表的主键实现自动增长,查网络实现如下: create tabl ...
- Mysql,SqlServer,Oracle主键自动增长的设置
在mysql中,如果把表的主键设为auto_increment类型,数据库就会自动为主键赋值.例如: CREATE TABLE google(id INT AUTO_INCREMENT PRIMARY ...
- Oracle中添加自动编号的序列
1. 创建表T_Test create table T_Test(id int ,address char(25), pay int); 2. 创建自增序列 create sequence SEQ_ ...
- ORACLE 自动增长通过封装函数,方便调用
好的编程习惯,是一个很有必要的过程.好的编程习惯,可以因人而异,但是简单地.基本地代码级别的就那些:写注释.合理的缩进.换行.变量命名等. 对我们程序员来说,大部分时间都对着电脑,在对着电脑的大部分时 ...
- oracle 主键应用序列和触发器实现自动增长
oracle 主键自动增长 这几天搞Oracle,想让表的主键实现自动增长,查网络实现如下: create table simon_example ( id number(4) not null pr ...
- Hibernate在oracle中ID增长的方式
引用链接:http://blog.csdn.net/w183705952/article/details/7367272 Hibernate在oracle中ID增长的方式 第一种:设置ID的增长策略是 ...
随机推荐
- Git_Commands
- Leetcode: Range Sum Query - Mutable && Summary: Segment Tree
Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive ...
- C++Builder 解决绘图闪动问题
使用双缓冲 Form->DoubleBuffered = true; Panel->DoubleBuffered = true;
- Python学习总结11:获取当前运行类名和函数名
一. 使用内置方法和修饰器方法获取类名.函数名 1. 外部获取 从外部的情况好获取,可以使用指向函数的对象,然后用__name__属性. def a(): pass a.__name__ 或者 get ...
- run()和star()区别
run()和star()区别 run()-->只是thread类的一个普通方法调用 star()-->用来启动线程,实现多线程运行
- demo03linearlayoutdemo;
package com.example.demo03linearlayoutdemo; import android.os.Bundle; import android.app.Activity; i ...
- paper 72 :高动态范围(HDR)图像 HDR (High Dynamic Range)
In standard rendering, the red, green and blue values for a pixel are each represented by a fraction ...
- User Managerment 职责不能使用的问题
1.此职责默认的是没有启用授权的(grant),需要在系统管理员职责下搜索到对应的菜单,进行grant 2.就算授权后,用户还是不能进行操作,需要进行以下设置: 1. Log into the app ...
- PAT乙级 1006. 换个格式输出整数 (15)
1006. 换个格式输出整数 (15) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 让我们用字母B来表示“百” ...
- 针对Android 模拟器启动慢的问题
Android 模拟器一直以运行速度慢著称,可以使用intel HAXM技术为Andorid模拟器加速.使模拟器运行度媲美真机, 彻底解决模拟器运行慢的问题. 1. Intel HAXM 是什么 In ...