Snippet Name: Copy one table to another
Description: Easy way to copy the contents of one table to another table.
Comment: (none)
Language: MYSQL
Highlight Mode: MYSQL
Last Modified: February 28th, 2009
|
INSERT INTO new_quotes
SELECT SUBSTRING( quoteid, 0, 0 ) , TYPE ,
QUOTE, rating, DATE, title, hits, catid,
submit_date, userid, author, lifespan, cat_name
FROM quotes WHERE quoteid <> ''
ORDER BY quoteid LIMIT 50 "; |