> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# create_* 会话设置

> ClickHouse 在 create_* 生成分组中的会话设置。

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>类型</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>默认值</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          无需重启即可更改
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

这些设置可在 [system.settings](/docs/zh/reference/system-tables/settings) 中查看，并由 [源代码](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) 自动生成。

<div id="create_if_not_exists">
  ## create\_if\_not\_exists
</div>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.9"},{"label": "0"},{"label": "新设置。"}]}]} />

默认对 `CREATE` 语句启用 `IF NOT EXISTS`。如果指定了此设置或 `IF NOT EXISTS`，且具有给定名称的表已存在，则不会抛出异常。

<div id="create_index_ignore_unique">
  ## create\_index\_ignore\_unique
</div>

<SettingsInfoBlock type="Bool" default_value="0" />

忽略 CREATE UNIQUE INDEX 中的 UNIQUE 关键字。此设置用于 SQL 兼容性测试。

<div id="create_replicated_merge_tree_fault_injection_probability">
  ## create\_replicated\_merge\_tree\_fault\_injection\_probability
</div>

<SettingsInfoBlock type="Float" default_value="0" />

在 ZooKeeper 中创建 metadata 后，创建表期间发生故障注入的概率

<div id="create_table_empty_primary_key_by_default">
  ## create\_table\_empty\_primary\_key\_by\_default
</div>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.11"},{"label": "1"},{"label": "易用性更佳"}]}]} />

允许在未指定 ORDER BY 和 PRIMARY KEY 的情况下创建主键为空的 \*MergeTree 表
