CREATE TABLE ... **EMPTY** AS SELECT

**Use case**

Create a table with the same structure as SELECT query returns but don't fill it.

**Describe alternatives you've considered**

CREATE TABLE ... AS DESCRIBE (SELECT ...)

\- more consistent but also more clunky.
}
    DatabasePtr database;
    bool need_add_to_database = !create.temporary;
    if (need_add_to_database)
        database = DatabaseCatalog::instance().getDatabase(database_name);
    if (need_add_to_database && database->getEngineName() == "Replicated")
    {
        auto guard = DatabaseCatalog::instance().getDDLGuard(create.getDatabase(), create.getTable());
        if (auto * ptr = typeid_cast<DatabaseReplicated *>(database.get());
            ptr && !getContext()->getClientInfo().is_replicated_database_internal)
        {
            assertOrSetUUID(create, database);
            guard->releaseTableLock();
            return ptr->tryEnqueueReplicatedDDL(query_ptr, getContext(), internal);
        }
    }
    if (create.replace_table)
        return doCreateOrReplaceTable(create, properties);
    
    bool created = doCreateTable(create, properties);
    if (!created)   
        return {};
    
    QualifiedTableName qualified_name{database_name, create.getTable()};
    TableNamesSet loading_dependencies = getDependenciesSetFromCreateQuery(getContext()->getGlobalContext(), qualified_name, query_ptr);
    if (!loading_dependencies.empty())
        DatabaseCatalog::instance().addLoadingDependencies(qualified_name, std::move(loading_dependencies));
    return fillTableIfNeeded(create);
}
bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create,