<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>http://wiki.eijux.com/index.php?action=history&amp;feed=atom&amp;title=MySQL_%E8%AF%AD%E5%8F%A5%EF%BC%9A%E6%95%B0%E6%8D%AE%E5%AE%9A%E4%B9%89%E8%AF%AD%E5%8F%A5%EF%BC%88DDL%EF%BC%89%EF%BC%9A%E2%80%9CALTER_TABLE%E2%80%9D%E8%AF%AD%E5%8F%A5</id>
	<title>MySQL 语句：数据定义语句（DDL）：“ALTER TABLE”语句 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.eijux.com/index.php?action=history&amp;feed=atom&amp;title=MySQL_%E8%AF%AD%E5%8F%A5%EF%BC%9A%E6%95%B0%E6%8D%AE%E5%AE%9A%E4%B9%89%E8%AF%AD%E5%8F%A5%EF%BC%88DDL%EF%BC%89%EF%BC%9A%E2%80%9CALTER_TABLE%E2%80%9D%E8%AF%AD%E5%8F%A5"/>
	<link rel="alternate" type="text/html" href="http://wiki.eijux.com/index.php?title=MySQL_%E8%AF%AD%E5%8F%A5%EF%BC%9A%E6%95%B0%E6%8D%AE%E5%AE%9A%E4%B9%89%E8%AF%AD%E5%8F%A5%EF%BC%88DDL%EF%BC%89%EF%BC%9A%E2%80%9CALTER_TABLE%E2%80%9D%E8%AF%AD%E5%8F%A5&amp;action=history"/>
	<updated>2026-04-29T18:46:27Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.38.2</generator>
	<entry>
		<id>http://wiki.eijux.com/index.php?title=MySQL_%E8%AF%AD%E5%8F%A5%EF%BC%9A%E6%95%B0%E6%8D%AE%E5%AE%9A%E4%B9%89%E8%AF%AD%E5%8F%A5%EF%BC%88DDL%EF%BC%89%EF%BC%9A%E2%80%9CALTER_TABLE%E2%80%9D%E8%AF%AD%E5%8F%A5&amp;diff=6534&amp;oldid=prev</id>
		<title>2023年3月31日 (五) 15:12 Eijux</title>
		<link rel="alternate" type="text/html" href="http://wiki.eijux.com/index.php?title=MySQL_%E8%AF%AD%E5%8F%A5%EF%BC%9A%E6%95%B0%E6%8D%AE%E5%AE%9A%E4%B9%89%E8%AF%AD%E5%8F%A5%EF%BC%88DDL%EF%BC%89%EF%BC%9A%E2%80%9CALTER_TABLE%E2%80%9D%E8%AF%AD%E5%8F%A5&amp;diff=6534&amp;oldid=prev"/>
		<updated>2023-03-31T15:12:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2023年3月31日 (五) 23:12的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[category:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;MySQL&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[category:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;MySQL文档&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 关于 ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 关于 ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Eijux</name></author>
	</entry>
	<entry>
		<id>http://wiki.eijux.com/index.php?title=MySQL_%E8%AF%AD%E5%8F%A5%EF%BC%9A%E6%95%B0%E6%8D%AE%E5%AE%9A%E4%B9%89%E8%AF%AD%E5%8F%A5%EF%BC%88DDL%EF%BC%89%EF%BC%9A%E2%80%9CALTER_TABLE%E2%80%9D%E8%AF%AD%E5%8F%A5&amp;diff=2295&amp;oldid=prev</id>
		<title>Eijux：​/* 关于 */</title>
		<link rel="alternate" type="text/html" href="http://wiki.eijux.com/index.php?title=MySQL_%E8%AF%AD%E5%8F%A5%EF%BC%9A%E6%95%B0%E6%8D%AE%E5%AE%9A%E4%B9%89%E8%AF%AD%E5%8F%A5%EF%BC%88DDL%EF%BC%89%EF%BC%9A%E2%80%9CALTER_TABLE%E2%80%9D%E8%AF%AD%E5%8F%A5&amp;diff=2295&amp;oldid=prev"/>
		<updated>2021-04-06T12:30:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;关于&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2021年4月6日 (二) 20:30的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;第2行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第2行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 关于 ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 关于 ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;xml&lt;/del&gt;&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mysql&lt;/ins&gt;&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ALTER TABLE tbl_name&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ALTER TABLE tbl_name&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     [alter_option [, alter_option] ...]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     [alter_option [, alter_option] ...]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Eijux</name></author>
	</entry>
	<entry>
		<id>http://wiki.eijux.com/index.php?title=MySQL_%E8%AF%AD%E5%8F%A5%EF%BC%9A%E6%95%B0%E6%8D%AE%E5%AE%9A%E4%B9%89%E8%AF%AD%E5%8F%A5%EF%BC%88DDL%EF%BC%89%EF%BC%9A%E2%80%9CALTER_TABLE%E2%80%9D%E8%AF%AD%E5%8F%A5&amp;diff=2263&amp;oldid=prev</id>
		<title>Eijux：​建立内容为“category:MySQL  == 关于 == &lt;syntaxhighlight lang=&quot;xml&quot;&gt; ALTER TABLE tbl_name     [alter_option [, alter_option] ...]     [partition_options]  alter_option:…”的新页面</title>
		<link rel="alternate" type="text/html" href="http://wiki.eijux.com/index.php?title=MySQL_%E8%AF%AD%E5%8F%A5%EF%BC%9A%E6%95%B0%E6%8D%AE%E5%AE%9A%E4%B9%89%E8%AF%AD%E5%8F%A5%EF%BC%88DDL%EF%BC%89%EF%BC%9A%E2%80%9CALTER_TABLE%E2%80%9D%E8%AF%AD%E5%8F%A5&amp;diff=2263&amp;oldid=prev"/>
		<updated>2021-04-05T17:35:24Z</updated>

		<summary type="html">&lt;p&gt;建立内容为“&lt;a href=&quot;/%E5%88%86%E7%B1%BB:MySQL&quot; title=&quot;分类:MySQL&quot;&gt;category:MySQL&lt;/a&gt;  == 关于 == &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt; ALTER TABLE tbl_name     [alter_option [, alter_option] ...]     [partition_options]  alter_option:…”的新页面&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[category:MySQL]]&lt;br /&gt;
&lt;br /&gt;
== 关于 ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
ALTER TABLE tbl_name&lt;br /&gt;
    [alter_option [, alter_option] ...]&lt;br /&gt;
    [partition_options]&lt;br /&gt;
&lt;br /&gt;
alter_option: {&lt;br /&gt;
    table_options&lt;br /&gt;
  | ADD [COLUMN] col_name column_definition&lt;br /&gt;
        [FIRST | AFTER col_name]&lt;br /&gt;
  | ADD [COLUMN] (col_name column_definition,...)&lt;br /&gt;
  | ADD {INDEX | KEY} [index_name]&lt;br /&gt;
        [index_type] (key_part,...) [index_option] ...&lt;br /&gt;
  | ADD {FULLTEXT | SPATIAL} [INDEX | KEY] [index_name]&lt;br /&gt;
        (key_part,...) [index_option] ...&lt;br /&gt;
  | ADD [CONSTRAINT [symbol]] PRIMARY KEY&lt;br /&gt;
        [index_type] (key_part,...)&lt;br /&gt;
        [index_option] ...&lt;br /&gt;
  | ADD [CONSTRAINT [symbol]] UNIQUE [INDEX | KEY]&lt;br /&gt;
        [index_name] [index_type] (key_part,...)&lt;br /&gt;
        [index_option] ...&lt;br /&gt;
  | ADD [CONSTRAINT [symbol]] FOREIGN KEY&lt;br /&gt;
        [index_name] (col_name,...)&lt;br /&gt;
        reference_definition&lt;br /&gt;
  | ADD CHECK (expr)&lt;br /&gt;
  | ALGORITHM [=] {DEFAULT | INPLACE | COPY}&lt;br /&gt;
  | ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT}&lt;br /&gt;
  | CHANGE [COLUMN] old_col_name new_col_name column_definition&lt;br /&gt;
        [FIRST | AFTER col_name]&lt;br /&gt;
  | [DEFAULT] CHARACTER SET [=] charset_name [COLLATE [=] collation_name]&lt;br /&gt;
  | CONVERT TO CHARACTER SET charset_name [COLLATE collation_name]&lt;br /&gt;
  | {DISABLE | ENABLE} KEYS&lt;br /&gt;
  | {DISCARD | IMPORT} TABLESPACE&lt;br /&gt;
  | DROP [COLUMN] col_name&lt;br /&gt;
  | DROP {INDEX | KEY} index_name&lt;br /&gt;
  | DROP PRIMARY KEY&lt;br /&gt;
  | DROP FOREIGN KEY fk_symbol&lt;br /&gt;
  | FORCE&lt;br /&gt;
  | LOCK [=] {DEFAULT | NONE | SHARED | EXCLUSIVE}&lt;br /&gt;
  | MODIFY [COLUMN] col_name column_definition&lt;br /&gt;
        [FIRST | AFTER col_name]&lt;br /&gt;
  | ORDER BY col_name [, col_name] ...&lt;br /&gt;
  | RENAME {INDEX | KEY} old_index_name TO new_index_name&lt;br /&gt;
  | RENAME [TO | AS] new_tbl_name&lt;br /&gt;
  | {WITHOUT | WITH} VALIDATION&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
partition_options:&lt;br /&gt;
    partition_option [partition_option] ...&lt;br /&gt;
&lt;br /&gt;
partition_option: {&lt;br /&gt;
    ADD PARTITION (partition_definition)&lt;br /&gt;
  | DROP PARTITION partition_names&lt;br /&gt;
  | DISCARD PARTITION {partition_names | ALL} TABLESPACE&lt;br /&gt;
  | IMPORT PARTITION {partition_names | ALL} TABLESPACE&lt;br /&gt;
  | TRUNCATE PARTITION {partition_names | ALL}&lt;br /&gt;
  | COALESCE PARTITION number&lt;br /&gt;
  | REORGANIZE PARTITION partition_names INTO (partition_definitions)&lt;br /&gt;
  | EXCHANGE PARTITION partition_name WITH TABLE tbl_name [{WITH | WITHOUT} VALIDATION]&lt;br /&gt;
  | ANALYZE PARTITION {partition_names | ALL}&lt;br /&gt;
  | CHECK PARTITION {partition_names | ALL}&lt;br /&gt;
  | OPTIMIZE PARTITION {partition_names | ALL}&lt;br /&gt;
  | REBUILD PARTITION {partition_names | ALL}&lt;br /&gt;
  | REPAIR PARTITION {partition_names | ALL}&lt;br /&gt;
  | REMOVE PARTITIONING&lt;br /&gt;
  | UPGRADE PARTITIONING&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
key_part:&lt;br /&gt;
    col_name [(length)] [ASC | DESC]&lt;br /&gt;
&lt;br /&gt;
index_type:&lt;br /&gt;
    USING {BTREE | HASH}&lt;br /&gt;
&lt;br /&gt;
index_option: {&lt;br /&gt;
    KEY_BLOCK_SIZE [=] value&lt;br /&gt;
  | index_type&lt;br /&gt;
  | WITH PARSER parser_name&lt;br /&gt;
  | COMMENT 'string'&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table_options:&lt;br /&gt;
    table_option [[,] table_option] ...&lt;br /&gt;
&lt;br /&gt;
table_option: {&lt;br /&gt;
    AUTO_INCREMENT [=] value&lt;br /&gt;
  | AVG_ROW_LENGTH [=] value&lt;br /&gt;
  | [DEFAULT] CHARACTER SET [=] charset_name&lt;br /&gt;
  | CHECKSUM [=] {0 | 1}&lt;br /&gt;
  | [DEFAULT] COLLATE [=] collation_name&lt;br /&gt;
  | COMMENT [=] 'string'&lt;br /&gt;
  | COMPRESSION [=] {'ZLIB' | 'LZ4' | 'NONE'}&lt;br /&gt;
  | CONNECTION [=] 'connect_string'&lt;br /&gt;
  | {DATA | INDEX} DIRECTORY [=] 'absolute path to directory'&lt;br /&gt;
  | DELAY_KEY_WRITE [=] {0 | 1}&lt;br /&gt;
  | ENCRYPTION [=] {'Y' | 'N'}&lt;br /&gt;
  | ENGINE [=] engine_name&lt;br /&gt;
  | INSERT_METHOD [=] { NO | FIRST | LAST }&lt;br /&gt;
  | KEY_BLOCK_SIZE [=] value&lt;br /&gt;
  | MAX_ROWS [=] value&lt;br /&gt;
  | MIN_ROWS [=] value&lt;br /&gt;
  | PACK_KEYS [=] {0 | 1 | DEFAULT}&lt;br /&gt;
  | PASSWORD [=] 'string'&lt;br /&gt;
  | ROW_FORMAT [=] {DEFAULT | DYNAMIC | FIXED | COMPRESSED | REDUNDANT | COMPACT}&lt;br /&gt;
  | STATS_AUTO_RECALC [=] {DEFAULT | 0 | 1}&lt;br /&gt;
  | STATS_PERSISTENT [=] {DEFAULT | 0 | 1}&lt;br /&gt;
  | STATS_SAMPLE_PAGES [=] value&lt;br /&gt;
  | TABLESPACE tablespace_name [STORAGE {DISK | MEMORY}]&lt;br /&gt;
  | UNION [=] (tbl_name[,tbl_name]...)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
partition_options:&lt;br /&gt;
    (see CREATE TABLE options)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
“ALTER TABLE”更改表的结构。例如，您可以添加或删除列，创建或销毁索引，更改现有列的类型或重命名列或表本身。&lt;br /&gt;
* 要使用 ALTER TABLE，您需要对该表具有“ALTER”，“CREATE”和“INSERT”权限。&lt;br /&gt;
*: 重命名表需要在旧表上使用“ALTER”和“DROP”，在新表上需要“ALTER”，“CREATE”和“INSERT”。&lt;br /&gt;
* 在表名之后，指定要进行的更改。如果没有给出，则 ALTER TABLE 不执行任何操作。&lt;br /&gt;
* 许多允许的更改的语法类似于“CREATE TABLE”语句的子句。“column_definition”子句对“ADD”和“CHANGE”使用与“CREATE TABLE”相同的语法。&lt;br /&gt;
* COLUMN 是可选的，可以省略。&lt;br /&gt;
* 单个 ALTER TABLE 语句中允许多个“ADD”，“ALTER”，“DROP”和“CHANGE”子句，并用逗号分隔。这是对标准 SQL 的 MySQL 扩展，每个 ALTER TABLE 语句仅允许每个子句之一。&lt;br /&gt;
*: 例如，要在单个语句中删除多个列，请执行以下操作：&lt;br /&gt;
*: &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
ALTER TABLE t2 DROP COLUMN c, DROP COLUMN d;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* 如果存储引擎不支持尝试的 ALTER TABLE 操作，则可能会产生警告。可以使用“SHOW WARNINGS”显示此类警告。&lt;/div&gt;</summary>
		<author><name>Eijux</name></author>
	</entry>
</feed>