**Use case**

ClickHouse already throws exception if the data for INSERT is empty:

```
Code: 108. DB::Exception: No data to insert
```

Let's introduce a setting, enabled by default, to control this behavior.
The user will be able to disable it to allow empty INSERTs.

This is useful in some batch scripts.
{
    auto query = query_to_execute;
    if (!query_parameters.empty())
    {
        /// Replace ASTQueryParameter with ASTLiteral for prepared statements.
        ReplaceQueryParameterVisitor visitor(query_parameters
        visitor.visit(parsed_query
        /// Get new query after substitutions.
        query = serializeAST(*parsed_query
    }
    /// Process the query that requires transferring data blocks to the server.
    const auto parsed_insert_query = parsed_query->as<ASTInsertQuery &>(
    if ((!parsed_insert_query.data && !parsed_insert_query.infile) && (is_interactive || (!stdin_is_a_tty && std_in.eof())))
        throw Exception("No data to insert", ErrorCodes::NO_DATA_TO_INSERT
    connection->sendQuery(
        connection_parameters.timeouts,
        query,
        global_context->getCurrentQueryId(),
        query_processing_stage,
        &global_context->getSettingsRef(),
        &global_context->getClientInfo(),
        true
    if (send_external_tables)
        sendExternalTables(parsed_query
    /// Receive description of table structure.
    Block sample;
    ColumnsDescription columns_description;
    if (receiveSampleBlock(sample, columns_description, parsed_query))
    {
        /// If structure was received (thus, server has not thrown an exception),