<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=Altering_MySQL_Tables</id>
	<title>Altering MySQL Tables - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=Altering_MySQL_Tables"/>
	<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Altering_MySQL_Tables&amp;action=history"/>
	<updated>2026-05-18T11:40:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://performiq.com/kb/index.php?title=Altering_MySQL_Tables&amp;diff=1652&amp;oldid=prev</id>
		<title>PeterHarding at 23:36, 9 March 2008</title>
		<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Altering_MySQL_Tables&amp;diff=1652&amp;oldid=prev"/>
		<updated>2008-03-09T23:36:46Z</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;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:36, 10 March 2008&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-l44&quot;&gt;Line 44:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 44:&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;ALTER TABLE enables you to change the structure of an existing table. For example, yo&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 enables you to change the structure of an existing table. For example, yo&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=Examples=&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ALTER TABLE employees MODIFY fname NEWDEFINITION&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;div&gt;&amp;lt;/pre&amp;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;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>PeterHarding</name></author>
	</entry>
	<entry>
		<id>https://performiq.com/kb/index.php?title=Altering_MySQL_Tables&amp;diff=1651&amp;oldid=prev</id>
		<title>PeterHarding: New page: =See=  * http://dev.mysql.com/doc/refman/5.0/en/alter-table.html  &lt;pre&gt; ALTER [IGNORE] TABLE tbl_name     alter_specification [, alter_specification] ...  alter_specification:     table_op...</title>
		<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Altering_MySQL_Tables&amp;diff=1651&amp;oldid=prev"/>
		<updated>2008-03-09T23:35:19Z</updated>

		<summary type="html">&lt;p&gt;New page: =See=  * http://dev.mysql.com/doc/refman/5.0/en/alter-table.html  &amp;lt;pre&amp;gt; ALTER [IGNORE] TABLE tbl_name     alter_specification [, alter_specification] ...  alter_specification:     table_op...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=See=&lt;br /&gt;
&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.0/en/alter-table.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALTER [IGNORE] TABLE tbl_name&lt;br /&gt;
    alter_specification [, alter_specification] ...&lt;br /&gt;
&lt;br /&gt;
alter_specification:&lt;br /&gt;
    table_option ...&lt;br /&gt;
  | ADD [COLUMN] col_name column_definition [FIRST | AFTER col_name ]&lt;br /&gt;
  | ADD [COLUMN] (col_name column_definition,...)&lt;br /&gt;
  | ADD {INDEX|KEY} [index_name] [index_type] (index_col_name,...)&lt;br /&gt;
  | ADD [CONSTRAINT [symbol]]&lt;br /&gt;
        PRIMARY KEY [index_type] (index_col_name,...)&lt;br /&gt;
  | ADD [CONSTRAINT [symbol]]&lt;br /&gt;
        UNIQUE [INDEX|KEY] [index_name] [index_type] (index_col_name,...)&lt;br /&gt;
  | ADD [FULLTEXT|SPATIAL] [INDEX|KEY] [index_name] (index_col_name,...)&lt;br /&gt;
  | ADD [CONSTRAINT [symbol]]&lt;br /&gt;
        FOREIGN KEY [index_name] (index_col_name,...)&lt;br /&gt;
        reference_definition&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;
  | MODIFY [COLUMN] col_name column_definition [FIRST | AFTER col_name]&lt;br /&gt;
  | DROP [COLUMN] col_name&lt;br /&gt;
  | DROP PRIMARY KEY&lt;br /&gt;
  | DROP {INDEX|KEY} index_name&lt;br /&gt;
  | DROP FOREIGN KEY fk_symbol&lt;br /&gt;
  | DISABLE KEYS&lt;br /&gt;
  | ENABLE KEYS&lt;br /&gt;
  | RENAME [TO] new_tbl_name&lt;br /&gt;
  | ORDER BY col_name [, col_name] ...&lt;br /&gt;
  | CONVERT TO CHARACTER SET charset_name [COLLATE collation_name]&lt;br /&gt;
  | [DEFAULT] CHARACTER SET charset_name [COLLATE collation_name]&lt;br /&gt;
  | DISCARD TABLESPACE&lt;br /&gt;
  | IMPORT TABLESPACE&lt;br /&gt;
&lt;br /&gt;
index_col_name:&lt;br /&gt;
    col_name [(length)] [ASC | DESC]&lt;br /&gt;
&lt;br /&gt;
index_type:&lt;br /&gt;
    USING {BTREE | HASH | RTREE}&lt;br /&gt;
&lt;br /&gt;
ALTER TABLE enables you to change the structure of an existing table. For example, yo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>PeterHarding</name></author>
	</entry>
</feed>