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
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:
- How to add bulk virtual data in database?Best solution by msdn.microsoft.com
- How can I insert posted data into the database?Best solution by Stack Overflow
- how to show data in textview from sqlite database in android?Best solution by Stack Overflow
- How to show data in database with a JTable?Best solution by java-tips.org
- How to protect data in SQLite database?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.