How to add data to the Jtable?

How to add data in this database?

  • I have a table called 'table' in mysql database.. and two columns in it : employees and addresses.. if i add some data in one column like this: INSERT INTO `table` (`employees`) VALUES ('employee1'), ('employee2'), ('employee3'); how can i add some data in addresses column but to fill in right next to already inserted employees data? because when i do it like this: INSERT INTO `table` (`addresses') VALUES ('adress1'), ('adress2'), ('adress3'); it will just continue and make series and not adding a proper adress for proper employee? Could anyone help me? Thank you!

  • Answer:

    Add the queries together. INSERT INTO `table` (`employees`, `addresses`) VALUES ('employee1', 'address1'), ('employee2', 'address2'), ('employee3', 'address3'); To update, use the SQL update statement. http://www.w3schools.com/sql/sql_update.asp

WithoutHead at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

Add the queries together. INSERT INTO `table` (`employees`, `addresses`) VALUES ('employee1', 'address1'), ('employee2', 'address2'), ('employee3', 'address3'); To update, use the SQL update statement. http://www.w3schools.com/sql/sql_update.asp

Clugswor...

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.