Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Oracle Error on Database Creation

Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm creating a table that's supposed to hold books.  The foreign key is the authorId and I want it to cascade on delete.  I'm using Oracle 11g.  Whenever I run this I get an error saying: ORA-00905: missing keyword

The tutorials I'm using say the syntax is correct.  This is where I've gone thus far:

Here's the statement I've written:

Saloon Keeper
Posts: 12013
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it's supposed to be "DOUBLE PRECISION", not double.

Anyway, why are you using floating point types for prices? Can the price of a book be in fractions of cents? Store the price as an integer number of cents.
Posts: 7108
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or maybe FLOAT, but I agree with Stephan about using integers for prices.  I have seen costs in fractions of a penny, though.
Put the moon back where you found it! We need it for tides and poetry and stuff. Like this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic