自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Oracle ID 自增代碼的詳細(xì)介紹

數(shù)據(jù)庫 Oracle
Oracle ID 自增是一種新生的語言,我們可以看到很多的書籍和網(wǎng)上的相關(guān)資料對其的實際操作步驟都有詳細(xì)的介紹。本文章就是對Oracle ID 自增在一些資料中很少見的idea

本文主要是介紹Oracle ID 自增代碼, Oracle ID 自增是計算機(jī)的實際應(yīng)用中經(jīng)常使用的計算機(jī)語言,如果你對其相關(guān)的代碼感興趣的話,你就可以點(diǎn)擊以下的文章對其進(jìn)行了解,望你會有所收獲。

1.創(chuàng)建表

Sql代碼

  1. -- Create table   
  2. create table USERS   
  3. (   
  4. ID NUMBER not null,   
  5. USERNAME VARCHAR2(25),   
  6. PASSWORD VARCHAR2(25),   
  7. EMAIL VARCHAR2(50)   
  8. )   
  9. tablespace USERS   
  10. pctfree 10   
  11. initrans 1   
  12. maxtrans 255   
  13. storage   
  14. (   
  15. initial 64K   
  16. minextents 1   
  17. maxextents unlimited   
  18. );   
  19. -- Create/Recreate primary, unique and foreign key 
    constraints   
  20. alter table USERS   
  21. add constraint ID primary key (ID)   
  22. using index   
  23. tablespace USERS   
  24. pctfree 10   
  25. initrans 2   
  26. maxtrans 255   
  27. storage   
  28. (   
  29. initial 64K   
  30. minextents 1   
  31. maxextents unlimited   
  32. );   
  33. -- Create table  
  34. create table USERS  
  35. (  
  36. ID NUMBER not null,  
  37. USERNAME VARCHAR2(25),  
  38. PASSWORD VARCHAR2(25),  
  39. EMAIL VARCHAR2(50)  
  40. )  
  41. tablespace USERS  
  42. pctfree 10  
  43. initrans 1  
  44. maxtrans 255  
  45. storage  
  46. (  
  47. initial 64K  
  48. minextents 1  
  49. maxextents unlimited  
  50. );  
  51. -- Create/Recreate primary, unique and foreign key constraints   
  52. alter table USERS  
  53. add constraint ID primary key (ID)  
  54. using index   
  55. tablespace USERS  
  56. pctfree 10  
  57. initrans 2  
  58. maxtrans 255  
  59. storage  
  60. (  
  61. initial 64K  
  62. minextents 1  
  63. maxextents unlimited  
  64. );  
  65.  

 

2.創(chuàng)建序列

Sql代碼

  1. CREATE SEQUENCE SEQ_USERS_ID   
  2. INCREMENT BY 1 -- 每次加幾個   
  3. START WITH 1 -- 從1開始計數(shù)   
  4. NOMAXVALUE -- 不設(shè)置最大值   
  5. NOCYCLE -- 一直累加,不循環(huán)   
  6. CACHE 10;   
  7. CREATE SEQUENCE SEQ_USERS_ID   
  8. INCREMENT BY 1 -- 每次加幾個   
  9. START WITH 1 -- 從1開始計數(shù)   
  10. NOMAXVALUE -- 不設(shè)置最大值   
  11. NOCYCLE -- 一直累加,不循環(huán)   
  12. CACHE 10;   

 

3.創(chuàng)建觸發(fā)器

Sql代碼

  1. create or replace trigger TRI_USERS_ID   
  2. before insert on users   
  3. for each row   
  4. declare   
  5. -- local variables here   
  6. begin   
  7. SELECT SEQ_USERS_ID.NEXTVAL   
  8. INTO :NEW.ID   
  9. FROM DUAL;   
  10. end TRI_USERS_ID;   
  11. create or replace trigger TRI_USERS_ID   
  12. before insert on users   
  13. for each row   
  14. declare   
  15. -- local variables here   
  16. begin   
  17. SELECT SEQ_USERS_ID.NEXTVAL   
  18. INTO :NEW.ID   
  19. FROM DUAL;   
  20. end TRI_USERS_ID;   
  21. Oracle 11g Multimedia DICOM   

 以上就是對Oracle ID 自增的實際應(yīng)用的代碼 的介紹,望你會有所收獲。

【編輯推薦】

  1. 對Oracle Multimedia導(dǎo)出圖像的操作步驟的描述
  2. 在oracle 模式中定義媒體對象有哪些
  3. Oracle Multimedia在ORDDicom中列中存儲DICOM詳解
  4. oracle spatial的五大優(yōu)點(diǎn)的具體表現(xiàn)
  5. Oracle Spatial創(chuàng)建空間索引的實際應(yīng)用介紹
責(zé)任編輯:佚名 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-04-30 12:15:42

Oracle自增ID

2011-03-21 12:58:26

Oracle自增字段

2010-04-26 14:03:02

Oracle使用

2010-04-26 11:55:48

Oracle自增字段

2010-04-09 09:28:30

Oracle自增字段

2022-11-08 19:30:52

DjangoID自增

2011-08-18 18:34:00

Oracle數(shù)據(jù)庫創(chuàng)建自增字段

2010-04-06 13:33:41

Oracle服務(wù)

2010-10-08 15:42:39

MySQL設(shè)置自增字段

2024-12-25 15:32:29

2018-12-14 15:35:20

MySQL索引數(shù)據(jù)庫

2010-11-12 10:38:24

SQL Server自

2010-04-12 16:03:12

Oracle SGA設(shè)

2022-06-03 08:12:52

InnoDB插入MySQL

2024-06-14 08:34:36

2024-11-11 00:00:06

MySQLID數(shù)據(jù)類型

2011-08-19 09:45:02

DB4O設(shè)置自增ID

2023-10-24 15:27:33

Mysql自增主鍵

2009-07-07 17:01:09

MyServlet

2023-12-26 01:09:28

MySQL存儲釋放鎖
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號