Stuart-Hannah Posted September 5, 2016 Posted September 5, 2016 Evening All, Just a random question, do you think that there is a way to have a table in MySQL with all the information in, and then I can have it copy the information from the table to another table? Sounds random but I want to make a kinda reference table with the data and then copy it to several other tables. Thanks in anticipation. Stuart
webman Posted September 5, 2016 Posted September 5, 2016 Yes, this is possible. The basic syntax for a query to do this is as follows: INSERT INTO `table_two` (col_a, col_b, col_c) SELECT `col_1`, `col_2`, `col_3` FROM `table_one`; The values from table_one in the col_1, col_2, and col_3 columns will be inserted into the col_a, col_b, and col_c columns of table two. It can get more complicated depending on which rows you want to copy, or if you want some different values, but that's the general idea. 1
Stuart-Hannah Posted September 5, 2016 Author Posted September 5, 2016 Perfect place to start, than yo very much. Have this projected completed in no time... I hope
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now