I have a table with more than 7000 book inserted, however I need to create another table for Gibis and Files, to have control of all the inserts I have a generic table called collection.
It follows the structures:
CREATE TABLE collection(
collectionCod INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
collectionType VARCHAR(50) NOT NULL,
CREATE TABLE book(
bookInfo INT PRIMARY KEY,
Something like this:
insert into collection (collectionTipy, collectionTitle, collectionImg, collectionInfo) select bookSubject, bookTitle, NULL, bookAuthor from book;
I don't know what the exact mapping is between the fields in the
collection, but this is the idea.