---
title: "DROP TYPE"
url: "https://docs.yugabyte.com/stable/api/ycql/ddl_drop_type/"
---

# DROP TYPE

Use the DROP TYPE statement to remove an existing user-defined data type.

## Synopsis

Use the `DROP TYPE` statement to remove an existing user-defined data type.

## Syntax

### Diagram

DROPTYPEIFEXISTS[type\_name](/stable/api/ycql/grammar_diagrams#type-name)

### Grammar

```ebnf
drop_type ::= DROP TYPE [ IF EXISTS ] type_name;
```

Where

- `type_name` is an identifier (possibly qualified with a keyspace name).

## Semantics

- An error is raised if the specified `type_name` does not exist unless `IF EXISTS` option is used.
- A user-defined `type_name` cannot be dropped if it is currently used in a table or another type.

## Examples

```sql
ycqlsh:example> CREATE TYPE person(first_name TEXT, last_name TEXT, email TEXT);
```

```sql
ycqlsh:example> DROP TYPE person;
```

## See also

- [CREATE TABLE](/stable/api/ycql/ddl_create_table "CREATE TABLE")
- [DROP KEYSPACE](/stable/api/ycql/ddl_drop_keyspace "DROP KEYSPACE")
