This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JDBC and the fly likes joining 2 table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "joining 2 table" Watch "joining 2 table" New topic
Author

joining 2 table

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 751
how can we join 2 table in java...

my backend is mysql

and in java i'm writting following statement to insert record in 2 table.



and i m getting the following error.
18:08:46,503 ERROR [STDERR] java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'F,brokenlink B (F.create_date,F.mail,F.topic,F.comment,B.link,B.create_date) val' at line 1


Jigar Naik


Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

First rule of JDBC:

You can't do anything in JDBC which you are not able to do in your database.


Can you insert in two tables unsing single DML.... If you can do this then you can also do it in java


Shailesh


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: joining 2 table
 
Similar Threads
Giving error brokenlink wsad5.1
msyql jdbc problem.
JasperException Unable to compile class for JSP
String -> MySQL CLOB
sql exception thrown