describe table in vertica
How do I describe table in vertica ? I am using DB visualizer as IDE . I want to do something as
Describe table in My-sql.
I have tried
SELECT column_name, data_type FROM system_columns WHERE table_name like
It does not work!! Returns 0 rows
Describe table in My-sql.
I have tried
SELECT column_name, data_type FROM system_columns WHERE table_name like
It does not work!! Returns 0 rows
0
Comments
Eugenia
dbadmin=> select column_name, data_type from system_columns where table_name ilike '%system_columns%';
column_name | data_type
--------------------------+----------------
table_id | int
table_schema | varchar(128)
table_name | varchar(128)
is_system_table | boolean
column_id | varchar(41)
column_name | varchar(128)
data_type | varchar(128)
data_type_id | int
data_type_length | int
character_maximum_length | int
numeric_precision | int
numeric_scale | int
datetime_precision | int
interval_precision | int
ordinal_position | int
is_nullable | boolean
column_default | varchar(65000)
(17 rows)
Right Click on table --> Select "Script as" option --> select "CREATE" Radio option --> Create table script created for you.
OR, you can use this query to get all details that you would get using describe table Hope this helps
NC
\d <table_name>
Use the command below :
\d table_name
Schema | Table | Column | Type | Size | Default | Not Null | Primary Key | Foreign Key
--------+----------------+----------------------+---------------+------+----------------------------------+----------+-------------+-------------
\d table_name
\dv view_name
\dt table_name --> table high level details