MysqlÐ޸ıí×Ö¶Î
#ÐÂÔöÒ»¸ö×ֶΣ¬Ä¬ÈÏֵΪ0£¬·Ç¿Õ£¬×Ô¶¯Ôö³¤£¬Ö÷¼ü
alter table tabelname add new_field_name field_type default 0 not null auto_increment ,add primary key (new_field_name);
#Ôö¼ÓÒ»¸öÐÂ×Ö¶Î
alter table tableName add new_field_name field_type;
alter table tableName add new_field_name field_type not null default '0';
#ɾ³ý×Ö¶Î
alter table tableName drop column field_name;
#ÖØÃüÃû×Ö¶Î
alter table tableName change old_field_name new_field_name new_field_type;
#¸Ä±ä×ֶεÄÀàÐÍ
alter table tableName change field_name field_name field_type;
#¸Ä±ä×Ö¶Î˳Ðò
alter table emp modify age int(3) first;
alter table emp modify age int(3) after name;
alter table users change user_group user_group VARCHAR( 10 ) after name ;
//Èç¹ûÒªÌáÇ°¾Í°ÑÔ×Ö¶Îɾ³ý£¬ÔÙÓÃfirst»òafterÊôÐÔ¸Ä
ÏÖÔÚÊý¾Ý¿âÖÐÓÐûÓÐÊý¾Ý£¬Èç¹ûûÓÐÊý¾Ý¿ÉÒÔÕâÑù×ö£º
1¡£°Ñ¸Ã×Ö¶Îɾ³ý
alter table your_tablename drop µç»°ºÅÂë
2¡£ÔÚÌí¼Ó¸Ã×Ö¶Î
alter table your_tablename add µç»°ºÅÂë first
Èç¹û¸Ã×ֶβ»Îª¿ÕÇÒΪÖ÷¼ü
alter table your_tablename add µç»°ºÅÂë not null primary key first
 
Ïà¹ØÎĵµ£º
ÏÖÔÚ´ó¸ÅÁгöÈçÏÂ:
1.Êý¾Ý¿âµÄÉè¼Æ
¾¡Á¿°ÑÊý¾Ý¿âÉè¼ÆµÄ¸üСµÄÕ¼´ÅÅÌ¿Õ¼ä.
1).¾¡¿ÉÄÜʹÓøüСµÄÕûÊýÀàÐÍ.(mediumint¾Í±Èint¸üºÏÊÊ).
2).¾¡¿ÉÄܵĶ¨Òå×Ö¶ÎΪnot null,³ý·ÇÕâ¸ö×Ö¶ÎÐèÒªnull.
3).Èç¹ûûÓÐÓõ½±ä³¤×ֶεĻ°±ÈÈçvarchar,ÄǾͲÉÓù̶¨´óСµÄ¼Í¼¸ñʽ±ÈÈçchar.
4).±íµÄÖ÷Ë÷ÒýÓ¦¸Ã¾¡¿ÉÄܵĶÌ.ÕâÑùµÄ»°Ã¿Ìõ¼Í¼ ......
ÄÚ´æ±íʹÓùþϣɢÁÐË÷Òý°ÑÊý¾Ý±£´æÔÚÄÚ´æÖУ¬Òò´Ë¾ßÓм«¿ìµÄËٶȣ¬Êʺϻº´æÖÐСÐÍÊý¾Ý¿â£¬µ«ÊÇʹÓÃÉÏÊܵ½Ò»Ð©ÏÞÖÆ£¬ÒÔÏÂÊÇÀ¶²ÝʹÓõÄһЩ¸ÐÊÜ¡£
1¡¢heap¶ÔËùÓÐÓû§µÄÁ¬½ÓÊǿɼûµÄ£¬ÕâʹµÃËü·Ç³£ÊʺÏ×ö»º´æ¡£
2¡¢½öÊʺÏʹÓõij¡ºÏ¡£heap²»ÔÊÐíʹÓÃxxxTEXTºÍxxxBLOBÊý¾ÝÀàÐÍ£»Ö»ÔÊÐíʹÓÃ=ºÍ<=>²Ù×÷·ûÀ´ËÑË÷¼Ç¼£¨²» ......
æµµÄ2009ÖÕÓÚ¹ýÈ¥£¬Ò²ÖÕÓÚ°ÑÈËÉú´óÊÂæÍêÁË£¬»Øµ½Õý³£µÄ¹¤×÷Éú»îÖÐÀ´¡£2010¶ÔÎÒÀ´ËµÓ¦¸ÃÊdzäÂúÐÂÆÚÍûµÄÒ»Ä꣬еÄÆõ»ú¾ÍÔÚÑÛÇ°£¬¼ÓÓÍŬÁ¦°É~
ÁíÍâ×¼±¸12¸öÔÂÖ®ºóÔÙÀ´×ܽáһϽñÄêµÄÖØ´óʼǣ¬ºÇºÇ~
˳±ã¿´µ½Ò»¸öMysqlµÄ²âÊÔÎÄÕ£¬¸Ð¾õ»¹ÂúÓвο¼¼ÛÖµµÄ£¬ÓÚÊǼǼÏÂÀ´ÒÔ±ã²Î¿¼¡£
ÒÔÏÂÊÇÒ»¸öMySQLÖÐMyISAMÒýÇæÓëInnoDBÒ ......
<?php
/*
* Ãû³Æ : MySQLÊý¾Ý¿â»ù±¾²Ù×÷
* ×÷Õß : pjx
* °æ±¾ : v 2010/02/25 v 1.0
* ˵Ã÷ : ¸ÃÀàÓÃÓÚ¶ÔMySQL×öһЩ¼òµ¥µÄ²Ù×÷
* ʾÀý £º
* ʵÀý => $db = new DB_MYSQL($database),´ò¸ö$databaseÊý¾Ý¿â
* ²éѯÊý¾Ý¿â => $db->query($sql_str),²éѯ$sql_st ......
[part1] http://download.csdn.net/source/2076258
[part2] http://download.csdn.net/source/2076272
[part3] http://download.csdn.net/source/2076276
[part4] http://download.csdn.net/source/2076283
[part02-04] http://www.ytgps.com/Images/nginx.rar
±¾ÎļþÌå»ý¹ý´ó·Ö4¸ö°ü£¬php-cgi+mysql+nginx.7z ......