-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
  • 62,789
  • 6
  • 49
  • 67
Gopichand
  • 1,006
  • 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,284
  • 16
  • 63
  • 91