Sample Header Ad - 728x90

Duplicating tables from database1 to database2 LIKE on same server fails, error 1064

1 vote
1 answer
30 views
I've been reading the MariaDB manual and tutorials and apparently this should work: EXPLAIN CREATE TABLE prefix_database2.table1 LIKE prefix_database1.table1;` The LIKE operator is supposed to duplicate the table columns and keys. I'm at a loss at why I'm getting the syntax error. **How do I duplicate a table in a second database from the first while maintaining the exact same columns, keys, etc?**
Asked by John (769 rep)
Jul 15, 2024, 09:33 PM
Last activity: Jul 15, 2024, 11:31 PM