Comments - INSERT SELECT

3 years, 5 months ago Ryan Leadenham

If you're doing an INSERT SELECT and the destination table has any INVISIBLE fields and you try to pull data into those fields, the query will fail due to field count mismatch (at least as of 10.3.20).

This can be an issue when migrating data. For example: INSERT INTO new_table SELECT old_table.*, old_table.invisible_field FROM old_table;

Hopefully something like the following will be permitted in the future: INSERT INTO new_table SELECT * FROM old_table WITH INVISIBLE;

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.