Drop a UDT

If you no longer need a UDT, you can use the DROP TYPE command to delete the UDT specification from the keyspace. All metadata associated with the UDT is also deleted.

The following example drops a UDT named race in the keyspace cycling:

DROP TABLE IF EXISTS cycling.cyclist_races;

If any tables use the UDT, you must drop those UDT columns before you can drop the UDT from the keyspace. All data stored as the UDT must be deleted because the type will no longer exist to define columns.

If you need to retain the data from UDT columns, take action to preserve the data before dropping the UDT column. For example, you could rewrite the data to one or more new columns, or you could extract the data and store it externally for data

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2025 DataStax, an IBM Company | Privacy policy | Terms of use | Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com