• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

unable to use identity columns

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,

i dont have any primary key in the table. so i decided to use IDENTITY columns instead. i used the following query in oracle 9i:

create table kbtable (RELATEDTO VARCHAR2(100) NOT NULL,
GENERALSUBTYPE VARCHAR2(200) NOT NULL,
ISSUEOPENDATE DATE NOT NULL,
ISSUESTATUS VARCHAR2(7) NOT NULL,
ISSUE VARCHAR2(1000) NOT NULL,
UPDATEGIVENBY VARCHAR2(100),
ADDEDBY VARCHAR2(2) NOT NULL,
ADDEDONDATE DATE NOT NULL,
LASTMODIFIED DATE ,
LASTMODIFIEDBY VARCHAR2(2),
ISSUE_ID INT IDENTITY PRIMARY KEY )

but i am getting an error:

missing or invalid option

i am able to create the table if i remove identity attribute

Please help

regards
sameer
 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Identity column is a sqlserver or access option. If you want to create an auto-incrementing column in oracle, you have to use sequence and triggers.

Beksy
 
Can't .... do .... plaid .... So I did this tiny ad instead:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic