public String getCreateTableCommand(Table table, boolean isRelative) {
    ST command = new ST(CREATE_TABLE_TEMPLATE);

    if (!isRelative) {
      command.add(DATABASE_NAME, unparseIdentifier(table.getDbName()));
    }
    command.add(TABLE_NAME, unparseIdentifier(table.getTableName()));
    command.add(TEMPORARY, getTemporary(table));
    command.add(EXTERNAL, getExternal(table));
    command.add(LIST_COLUMNS, getColumns(table));
    command.add(COMMENT, getComment(table));
    command.add(PARTITIONS, getPartitions(table));
    command.add(PARTITIONS_BY_SPEC, getPartitionsBySpec(table));
    command.add(BUCKETS, getBuckets(table));
    command.add(SKEWED, getSkewed(table));
    command.add(ROW_FORMAT, getRowFormat(table));
    command.add(LOCATION_BLOCK, getLocationBlock(table));
    command.add(PROPERTIES, getProperties(table));

    return command.render();
  }
Returns the create view statement for the given view.

@param table
@return create view statement.
ql/src/java/org/apache/hadoop/hive/ql/exec/DDLPlanUtils.java