Posted By

sjacunningham on 01/14/11


Tagged

data testing


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

qubestream


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


 / Published in: MySQL
 

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

  1. CREATE TABLE NEW_TABLE_NAME SELECT * FROM EXISTING_TABLE WHERE SOME_VAILD_WHERE_CLAUSE

Report this snippet  

You need to login to post a comment.