Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

INHERIT Clause

Description

When a class is created as a sub class, the class inherits all attributes and methods of the super class. 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:

{ column_name | method_name } OF superclass_name [ AS alias ]

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