Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 | 

Inheriting Attributes and Methods

Description

When a class is created as a subclass, the class inherits all attributes and methods of the superclass. A name conflict that occurs during inheritance can be handled by either a system or a user. To resolve the name conflict directly, add the INHERIT clause to the CREATE CLASS statement.

Syntax

CREATE CLASS
.
.
.
INHERIT resolution [ {, resolution }_ ]

resolution:
attr_mthd_name OF super_class_name [ AS alias ]

For the attr_mthd_name in the INHERIT clause, specify the name of the attribute or method of the superclass to inherit. With the ALIAS clause, you can resolve a name conflict that occurs in multiple inheritance statements by inheriting a new name.