• Post Reply Bookmark Topic Watch Topic
  • New Topic

Retrieving table contents from DB as insert queries

 
Nidheesh Krishna
Ranch Hand
Posts: 59
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to retrieve tables contents from a mysql db as insert queries in java?
for eg, I've a table named "Person" with two fields name and age.
name   age
AAAA10
NNN10


i want to retieve queries,
insert into Person (name,age) values("AAA",10);
insert into Person (name,age) values("NNN",10); through java codes.
any solution for this ?
 
Campbell Ritchie
Marshal
Posts: 52581
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You appear to have arrived in an inappropriate forum, but don't worry; I shall move you.
I suggest you start with this Java™ Tutorials section.
 
Paul Clapham
Sheriff
Posts: 21889
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see why there wouldn't be a solution. (I'm assuming that given a table full of data, you want to generate an SQL script which can be used in the future to populate a new, empty, table with that data.) What do you have so far, and what sort of issues do you think are preventing you from finding that solution?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!