how to show the create statements?

Hi,Dear everyone.
I want to show the create statements,like mysql's show create table xxx,show create procedure xxx etc.But vertica does not has "show" command.can you help me?

Comments

  • Abhishek_RanaAbhishek_Rana Vertica Employee Employee
    Hi,

    There is no SHOW command in vertica , but to get what you required you can use below:

    EXPORT_OBJECTS( '/tmp/design.sql', 'object_name');

    Here object_name can be replaced with schema_name.table_name

    And

    /tmp/design.sql will be the file, where DDl for this object can be found

    Regards'

    Abhishek

  • Thank you very much!
    I will try it.
  • Abhishek_RanaAbhishek_Rana Vertica Employee Employee
    I missed the full syntax , it should be like this:

    select EXPORT_OBJECTS( '/tmp/design.sql', 'object_name');

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file