我有一个Vertica数据库,需要描述一些表。在MySQL中,您使用describe table_name
。我知道在Vertica中使用\d table_name
。
此外,我需要通过Python进行操作,但是当我进行查询时:
cur.execute("\d table_name")
I get this problem:
vertica_python.errors.VerticaSyntaxError: Severity: ERROR, Message: Syntax error at or near "\", Sqlstate: 42601, Position: 1, Routine: base_yyerror, File: /scratch_a/release/vbuild/vertica/Parser/scan.l, Line: 1004, SQL: '\\d table_name'
有没有其他方法可以在Vertica中获取列和列类型呢?