Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - SQL Reference » SQL statements » Alphabetical list of SQL statements

DROP DATATYPE statement

Removes a data type from the database.

Syntax
DROP DATATYPE datatype-name
Remarks

It is recommended that you use DROP DOMAIN rather than DROP DATATYPE, as DROP DOMAIN is the syntax used in the ANSI/ISO SQL Standard. You cannot drop system-defined data types (such as MONEY or UNIQUEIDENTIFIERSTR) from a database.

Privileges

You must be the owner of the data type, or have the DROP DATATYPE or DROP ANY OBJECT system privilege.

Side effects

Automatic commit.

Standards
  • ANSI/ISO SQL Standard

    Domain support is optional ANSI/ISO SQL Language Feature F251. The DROP DATATYPE statement is not in the standard.

Example

The following example creates and then drops a datatype called PhoneNum:

CREATE DATATYPE PhoneNum CHAR(12) NULL;
DROP DATATYPE PhoneNum;