This week's book giveaways are in the Jython/Python and Object-Oriented programming forums.
We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming 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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

JavaDb creating table error

 
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is my first tsble


i have created this tasble on JavaDb

when i am going to creat the next table it gives error
this is the next table script



here is the eror


screenshot is here

http://4.bp.blogspot.com/_bpkZ2BsqXug/S21OLQkrVUI/AAAAAAAAAF0/i2rOxn4pHJA/s1600-h/db.gif
 
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

see http://www.w3schools.com/SQl/sql_foreignkey.asp

just add a "," after

DEPT_ID" INTEGER




1. CREATE TABLE "Student" (
2. "ID" INTEGER not null primary key,
3. "NAME" VARCHAR(30),
4. "DEPT_ID" INTEGER,
5. FOREIGN KEY (DEPT_ID) REFERENCES DEPARTMENT(DEPT_ID)
6. );

 
Samanthi perera
Ranch Hand
Posts: 510
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Now i have inserting data to table



No, you are "nserting" ....
 
You will always be treated with dignity. Now, strip naked, get on the probulator and hold this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!