Altering a Database


The ALTER DATABASE statement enables you to change the characteristics of an existing database. Its syntax is the same as the syntax of the CREATE DATABASE statement, and any CHARACTER SET or COLLATE specification changes the behavior of an existing database.

For example, suppose you want to change greekdb to use the ASCII character set. You would issue the following command:

 mysql> ALTER DATABASE greekdb     -> CHARACTER SET ascii; Query OK, 1 row affected (0.00 sec) 





Sams Teach Yourself MySQL in 10 Minutes
Sams Teach Yourself MySQL in 10 Minutes
ISBN: 0672328631
EAN: 2147483647
Year: 2006
Pages: 165
Authors: Chris Newman

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net