Create new table from a selection from another existing table (including copying data structure)


/ Published in: MySQL
Save to your folder(s)

This is ideal for testing queries etc. Run this to copy a selection of data into a new table with the same scructure. Then you can run test queries etc on it. Once you are happy then run the queries on the live data table...enjoy


Copy this code and paste it in your HTML
  1. create table NEW_TABLE_NAME select * from EXISTING_TABLE where SOME_VAILD_WHERE_CLAUSE

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.