MySQL does not support table inheritance. The only way to get closer to functionality is to use a foreign key (which MySQL is not too good):
CREATE TABLE first ( id serial, PRIMARY KEY (id) ); CREATE TABLE second ( parent integer REFERENCES first, PRIMARY KEY (parent) );
Obviously, you will have to change any views and queries from the "PostgreSQL inheritance version" to regular, multiply-connected queries.
Patrick
source share