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 | 

DROP SUPERCLASS Clause

Description

Deleting a super class from a class means removing the relationship between two classes. If a super class is deleted from a class, it changes inheritance relationship of the classes as well as of all their sub classes.

Syntax

ALTER CLASS

.

.

.

DROP SUPERCLASS class_name [ { , class_name }_ ]

[ INHERIT resolution [ {, resolution }_ ] ] [ ; ]

 

resolution:

{ column_name | method_name } OF superclass_name [ AS alias ]

For the first class_name, specify the name of the class to be modified. For the second class_name, specify the name of the super class to be deleted. If a name conflict occurs after deleting a super class, see the Resolving Class Conflict section for the resolution.

Example 1

The following example shows how to inherit the female_event class from the event class.

CREATE CLASS female_event UNDER event

Example 2

The following example shows how to delete the super class event from the female_event class. Attributes that the female_event class inherited from the even class no longer exist.

ALTER CLASS female_event

    DROP SUPERCLASS event;