forked from orientechnologies/orientdb
-
Notifications
You must be signed in to change notification settings - Fork 0
SQLCreateClass
jazzzz edited this page Dec 13, 2012
·
1 revision
The SQL Create Class command creates a new class in the schema. NOTE: If a cluster with the same name exists in the database will be used as default cluster.
CREATE CLASS <class> [<super-class>](EXTENDS) [<clusterId>*](CLUSTER)
Where:
- class is the class to create
- super-class, optional, is the super-class to extend
- clusterId can be a list separated by comma (,). At least one element is mandatory and it's also the default cluster id
Create the class 'Account': CREATE CLASS Account
Create the class 'Car' that extends 'Vehicle': CREATE CLASS Car extends Vehicle
Create the class 'Car' with clusterId 10: CREATE CLASS Car CLUSTER 10
Create the class 'Person' as Concepts#Abstract_Class abstract: CREATE CLASS Person ABSTRACT
To remove a class use the Drop Class command.
To know more about other SQL commands look at SQL commands.
This is a command of the Orient console. To know all the commands go to Console Commands.