紧急请教高手:oracle中如何设置自增字段??? http://expert.csdn.net/Expert/topic/1418/1418633.xml?temp=.8717157 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 建立一个最小为1,最大为999999999的一个序列号会自动循环的序列create sequence 序列名 increment by 1 start with 1 maxvalue 999999999 cycle;当向表中插入数据时,SQL语句写法如下:SQL> insert into 表名 values(序列名.nextval,列1值,列2值); http://expert.csdn.net/Expert/topic/1470/1470941.xml?temp=.4081079http://expert.csdn.net/Expert/topic/1465/1465844.xml?temp=3.927249E-02http://expert.csdn.net/Expert/topic/1436/1436331.xml?temp=.5476343讲的详细死了,看看~!:) 1、请先建立序列:create sequence tempminvalue 1maxvalue 999999start with 1increment by 1cache 100order;2、建测试用的表:create table temp (aa number,bb number);3、在表中插入数据:insert into temp values (v_temp.nextval,1);4、验证:SQL> select * from temp; AA BB---------- ---------- 1 1 ora 01017 报错怎么解决? 数据库备份, 用户权限问题急,多谢! 报错了,请好手们看看。 关于Oracle的可选条件查询 一個小問題:在查詢中如何判斷一字段前13位中是否包含某一字符? 请教一个简单的SQL语句,解决马上结分。 这样的SQL如何实现? oracle是什么东西?我是菜鸟,高手请教 名称已被一现有约束条件占用 linux下oracle安装问题!!!!!!急急急!!!!!! oracle安装问题
increment by 1
start with 1
maxvalue 999999999
cycle;当向表中插入数据时,SQL语句写法如下:SQL> insert into 表名 values(序列名.nextval,列1值,列2值);
http://expert.csdn.net/Expert/topic/1465/1465844.xml?temp=3.927249E-02
http://expert.csdn.net/Expert/topic/1436/1436331.xml?temp=.5476343讲的详细死了,看看~!:)
create sequence temp
minvalue 1
maxvalue 999999
start with 1
increment by 1
cache 100
order;
2、建测试用的表:
create table temp (aa number,bb number);
3、在表中插入数据:
insert into temp values (v_temp.nextval,1);
4、验证:
SQL> select * from temp; AA BB
---------- ----------
1 1