|
Java™ by example!
|
|
|
How do I insert data in a database table?
Check out the MySQL syntax for INSERT here. Here's an example that populates the customer table, created in this answer with 2 rows. Basically, get a statement from your connection and call executeUpdate passing in the INSERT SQL statement. Main.java:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|