SQL Statements

This section describes the syntax and meaning of each of MySQL's SQL statements. A statement will fail if you do not have the necessary privileges to perform it. For example, USE db_name fails if you have no permission to access the database db_name.

ALTER TABLE

ALTER [IGNORE] TABLE tbl_name
							action_list
						

ALTER TABLE allows you to rename tables or modify their structure. To use it, specify the table name tbl_name, then give the specifications for one or more actions to be performed on the table. The IGNORE keyword comes into play if duplicate values result in unique keys in the new table. Without IGNORE, the effect of the ALTER TABLE statement is cancelled. With IGNORE, the rows that duplicate values for unique keys are deleted. ...

Get MySQL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.