example of the gradual growth from the oracle

2011-08-21  来源:本站原创  分类:Database  人气:73 

/ / For example, the table structure
crete table t_user (id varchar2 (20), name varchar2
(100), add varchar2 (200));

/ / Create a sequence
create sequence t_user_ID
minvalue 1
maxvalue 100000
start with 1
increment by 1

(2) to trigger code
create or replace trigger t_user_dml_tgr
before insert
on t_user
for each row
declare
primary_key_value varchar (10);
begin
select t_user_id.nextval into primary_key_value

from dual;
: New.id: = primary_key_value;
end;

相关文章
  • example of the gradual growth from the oracle 2011-08-21

    / / For example, the table structure crete table t_user (id varchar2 (20), name varchar2 (100), add varchar2 (200)); / / Create a sequence create sequence t_user_ID minvalue 1 maxvalue 100000 start with 1 increment by 1 (2) to trigger code create or

  • PowerDesigner automatically create a sequence of growth of the Oracle database 2011-04-12

    The operation is based on PowerDesigner 15. The first step: create a data table (create table omitted). Step Two: Set the sequence to the data, automatic growth. 1 column in a table view to create. Double-click the table view, open the Table Properti

  • Hibernate to achieve in the automatic growth of Oracle default category 2010-07-01

    Hibernate to achieve in the automatic growth of Oracle default category This article describes how to implement Oracle's Automatic Hibernate growth. According to hibernate in the document, there are two ways to achieve physical objects primary key au

  • Growth to achieve the primary key automatically 2010-02-25

    Oracle automatically generated code (implementation sqlserver from the growth of field) oracle automatic number Automatic number in the access of data types, MSSQL, and MYSQL also have auto-growing data type, insert the records do not operate in this

  • Oracle's extent management (ZC) 2010-11-14

    extent management in two ways extent management local; extent management dictionary The default is the local Each mode of growth, there are two sizes: uniform: the default is 1M size in the temp table space as the default, but can not be used in the

  • I work ten years in Huawei 2011-07-31

    Learning experience of their predecessors, from successful people who find their own lack of efforts to improve their competitiveness. ------------------------------------------ Author Background: Xu Jiajun Huawei data center's head, technical super

  • WebGIS WebGIS and SNS technologies to achieve new forms of applications 2011-02-14

    Reference Note: the original from http://database.51cto.com/art/200907/135431.htm , for the convenience of my reading, the text format is slightly adjusted. Abstract: With the Internet technology gradually change the world, social Web services for ge

  • Agile development methodologies and structured development methods can co-exist 2010-05-10

    Edit Overview Agile development and structural development: can co-exist? Pekka Abrahamsson Unisiverty of Helsinki Muhammad Ali Babar IT Unisiverty of Copenhagen Philippe Kruchten University of British Columbia Agile development to a large extent aff

  • Secret: the most cattle Five tips for programmers 2010-06-03

    Want to be the most cattle programmer it? The following points will help you achieve this goal. Tip 1 to methods instead of Memory One of my programmer friends often told me to remember more than 200 C + + function, how helpful. "I never need to go f

  • [Reprint] Rupert Industries: "Dawn" project 2010-07-27

    You call Robert, dated January 3, 2001. In the holidays, you and your family have spent easily allows you to restore the spirit of the time, ready to work. You and your team sitting room. Department managers to convene the meeting. "We have some idea

  • android application of data analysis 2011-05-27

    Transfer from: http://mobile.csdn.net/a/20110526/298741.html Record speech is as follows: Hello everybody, first to introduce myself My name is Yuan Cong, one of the founders is the application of exchange, thank you CSDN, thank garage coffee with yo

  • The first five years after graduation to determine your destiny 2009-12-24

    As the "workers" Tang Jun said: "I do not think there are two people compete with others interests and value in return. The first person who is just entering the business, the first five years do not say you can give me a little pay The mos

  • Microsoft intends to force the business software market to build multi-billion dollar business 2011-04-12

    According to foreign media reports, Microsoft CEO Steve Ballmer (Steve Ballmer) said on Monday that Microsoft will steadily growing business software market, launched the most powerful impact, hoping to create another multi-billion dollar business. A

  • Agile development methodologies and structured development methodologies can coexist 2010-05-10

    Editing Overview Agile development and structural development: can co-exist? Pekka Abrahamsson Unisiverty of Helsinki Muhammad Ali Babar IT Unisiverty of Copenhagen Philippe Kruchten University of British Columbia Agile development to a large extent

  • [Zhuantie] Rupert Industries: "Zhaohui" project 2010-07-27

    You called Robert, the date is January 3, 2001. In the holidays, you and your family are spent relaxing time so that you restore the spirit, ready to work. You and your team sitting room. Department managers called for this meeting. "We have some ide

  • Richter substitution principle (Liskov Substitution Principle, LSP) 2011-06-26

    4 Richter substitution principle (Liskov Substitution Principle, LSP) 4.1 What is the principle of substitution Richter Richter substitution principle is a Massachusetts Institute of Technology (MIT) Computer Science Laboratory Ms. Liskov, OOPSLA Con

  • sql, MySQL, Oracle set the variables from the aggregate growth 2010-03-09

    1, sql set by the variable use of self-identity keyword, the keyword can easily specify what numbers from the beginning, an increase of the number. Such as: create table test(id int identity(100,10) primary key not null, name varchar(10)); 2, mysql s

  • mysql sql oracle database tabulation of three different points from growth 2010-04-28

    mysql follows: create table cronie ( /** Since growth **/ id INT NOT NULL AUTO_INCREMENT, name VARCHAR(60) NOT NULL default ' Want to fly the crocodile ', ) sql server follows: create table cronie ( /** Since growth **/ id int identity(1,1) primary k

  • ORACLE Sequence from growth 2010-05-13

    Sequence is a database system according to certain rules automatically increase the number of sequences. This sequence usually the primary key as the agent (because it would not repeat), no other meaning. Sequence characteristics of the database syst

  • Using Oracle Database 10g by recycling waste of space. Online form and re-assessment of growth trends, to effectively carry out storage management in the paragraph 2010-06-22

    Recently, someone asked me to evaluate a database to compete with Oracle RDBMS. The supplier of the demonstration, the audience that the "best" feature is that for online reorganization of support - the products can be re-deployed the online dat