Does MySQL support table inheritance? Does MySQL support table inheritance? postgresql postgresql

Does MySQL support table inheritance?


MySQL does not support table inheritance. The only way to approximate the functionality is by using a foreign key (which MySQL isn't too good at either):

CREATE TABLE first (  id serial,  PRIMARY KEY (id));CREATE TABLE second (  parent integer REFERENCES first,  PRIMARY KEY (parent));

Obviously, you'd have to change any views and queries from the PostgreSQL "inheritance version" to regular multi-relation queries.