DESCRIBE TABLE equivalent in CockroachDB?
Asked Answered
T

1

7

I tried using Oracle's DESCRIBE TABLE... statement in CockroachDB and got a syntax error. What’s the equivalent command?

Tokay answered 10/4, 2017 at 18:3 Comment(0)
T
9

In CockroachDB, the SHOW COLUMNS statement returns information about the columns in a table, similar to the DESCRIBE statement in MySQL and the \d command in PostgreSQL:

SHOW COLUMNS FROM tablename;

You can also get some information by running SHOW INDEX or SHOW CREATE TABLE or by querying the information_schema database.

Tokay answered 10/4, 2017 at 18:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.