Monday, 27 January 2020

Cassandra: DROP TABLE: Drop the table


You can drop a table, by using ‘DROP TABLE’ command.

Syntax
<drop-table-stmt> ::= DROP TABLE ( IF EXISTS )? <tablename>

Example
DROP TABLE employee;

If you are outside the keyspace, then you should prefix the table with keyspace name.

DROP TABLE <keyspaceName>.tableName;

Previous                                                    Next                                                    Home

No comments:

Post a Comment