Home > database >  Oracle table statements
Oracle table statements

Time:10-30

Oracle simulation (EMP), an employee table inside as long as the employee id (id), name (name), department (deptno) three fields, id since, random string name, a random 10,20,30,40 deptno, built the predicative words how to write?

CodePudding user response:

ORACLE can't like used when creating a table to adjust the field properties for the ID, create a sequence table requires a separate sequence, I met in the writing of the stored procedure, each data need to separate calls the sequence table, generate maximum ID and then insert the data

CodePudding user response:

reference 1st floor dust - r reply:
ORACLE can't like used when creating a table to adjust the field properties to achieve the ID, create a sequence table requires a separate sequence, I met in the writing of the stored procedure, each data need to separate calls the sequence table, generate maximum ID and then insert the data

The key is not deptno random within 10 to 40, this how to implement
  • Related