12

I'm trying to explore the database and want to see all tables that exist there. What's the command that's equivalent to SHOW TABLES; in SQL?

Ahmad Farid
  • 14,398
  • 45
  • 96
  • 136

3 Answers3

17

to get all table names : DESC tables;

to get detailed view of a table : DESC table <table_name>;

to get detailed view of all tables in a keyspace : DESC keyspace <keyspace_name>;

LuFFy
  • 8,799
  • 10
  • 41
  • 59
Laxmikant
  • 1,551
  • 1
  • 13
  • 30
9

Yes, you can use the DESCRIBE command:

DESCRIBE tables;
NiVeR
  • 9,644
  • 4
  • 30
  • 35
3

Depending on the version of Cassandra, the following may work for you

SELECT * FROM system_schema.tables

Check out the other tables in the system_schema keyspace to see what other info you can get

adinas
  • 4,150
  • 3
  • 37
  • 47