-1

Can anyone help me to auto-generate the empID field, so that we don't enter the value through the insert statement. create table employee( empID int,designation varchar(10)); What shall be the code so that I enter only designation and ename but not empID (which should be automatically generated)?

Joe
  • 61,796
  • 6
  • 45
  • 62
Gopichand
  • 996
  • 1
  • 9
  • 12
  • This question seems to have been answered several times. Try this one: http://stackoverflow.com/questions/11296361/how-to-create-id-with-auto-increment-on-oracle – gkalpak Jun 10 '13 at 04:35

1 Answers1

1

Use sequences. I have used this and they work great.

travega
  • 8,112
  • 16
  • 60
  • 91