[ת]mysql alter Óï¾äÓ÷¨,Ìí¼Ó¡¢Ð޸ġ¢É¾³ý×ֶεÈ
mysql alter Óï¾äÓ÷¨,Ìí¼Ó¡¢Ð޸ġ¢É¾³ý×ֶεÈ
//Ö÷¼ü549830479
alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);
//Ôö¼ÓÒ»¸öÐÂÁÐ549830479
alter table t2 add d timestamp;
alter table infos add ex tinyint not null default '0';
//ɾ³ýÁÐ549830479
alter table t2 drop column c;
//ÖØÃüÃûÁÐ549830479
alter table t1 change a b integer;
//¸Ä±äÁеÄÀàÐÍ549830479
alter table t1 change b b bigint not null;
alter table infos change list list tinyint not null default '0';
//ÖØÃüÃû±í549830479
alter table t1 rename t2;
¼ÓË÷Òý549830479
mysql> alter table tablename change depno depno int(5) not null; &n
Ïà¹ØÎĵµ£º
Ò»Ö±Ïëдµã¶«Î÷£¬µ«È´³Ù³ÙûÓпªÊ¼£¬½ñÌìÎÞÒâÖлص½ERP100Õâ¸öÍøÕ¾£¬·¢ÏÖÓÐÁËQADµÄרÇø£¬ÓÚÊÇ£¬Ò»Ê±ÈÈѪ·ÐÌÚ£¬Ð´Á˵㶫Î÷£¬¾Í½è´Ë»ú»á½«ÄÚÈÝÒ²·¢µ½ÕâÀï°É£¬ºÇºÇ¡£
ÆäʵÄÚÈݶ¼ÊDZ¾ÈËдµÄ£¬²»¹ýΪÁËͼ·½±ã£¬ÔÚERP100ÖÐдÍêÁË£¬È»ºóÖ±½ÓCopyµ½ÕâÀ͵Á˵ãÀÁ£¬ºÇºÇ¡£
ÒÔÏÂÊÇÕýÎÄ£¬ÔÚERP100ÖеĵØÖ·ÊÇ
http://bbs.erp100.com ......
mysqlµÄ find_in_setº¯ÊýʹÓ÷½·¨
ºÜ¶àʱºòÎÒÃÇÔÚÉè¼ÆÊý¾Ý¿âʱÓÐÕâÖÖÇé¿ö,±ÈÈç:
ÓиöÎÄÕ±íÀïÃæÓиötype×Ö¶Î,Ëû´æ´¢µÄÊÇÎÄÕÂÀàÐÍ,ÓÐ 1Í·Ìõ,2ÍƼö,3Èȵã,4ͼÎÄ .....11,12,13µÈµÈ
ÏÖÔÚÓÐƪÎÄÕÂËû¼ÈÊÇ Í·Ìõ,ÓÖÊÇÈȵã,»¹ÊÇͼÎÄ,
typeÖÐÒÔ 1,3,4µÄ¸ñʽ´æ´¢.
ÄÇÃÇÎÒÃÇÈçºÎÓÃsql²éÕÒËùÓÐtypeÖÐÓÐ4ͼÎıê×¼µÄÎÄÕÂÄØ ......
1£º Can’t connect to [local] MySQL server´íÎó
Ò»¸öMySQL¿Í»§¿ÉÒÔÁ½ÖÖ²»Í¬µÄ·½Ê½Á¬½Ómysqld·þÎñÆ÷£ºUnixÌ×½Ó×Ö£¬Ëüͨ¹ýÔÚÎļþϵͳÖеÄÒ»¸öÎļþ(ȱʡ“/tmp /mysqld.sock”)½øÐÐÁ¬½Ó£»»òTCP/IP£¬Ëüͨ¹ýÒ»¸ö¶Ë¿ÚºÅÁ¬½Ó¡£UnixÌ×½Ó×Ö±ÈTCP/IP¸ü¿ì£¬µ«ÊÇÖ»ÓÐÓÃÔÚÁ¬½Óͬһ̨¼ÆËã»úÉϵķþÎñÆ÷¡£Èç¹ûÄ ......
1005£ºMYSQL´´½¨±íʧ°Ü
¡¡¡¡
¡¡¡¡1006£ºMYSQL´´½¨Êý¾Ý¿âʧ°Ü
¡¡¡¡
¡¡¡¡1007£ºMYSQLÊý¾Ý¿âÒÑ´æÔÚ£¬´´½¨Êý¾Ý¿âʧ°Ü
¡¡¡¡
¡¡¡¡1008£ºMYSQLÊý¾Ý¿â²»´æÔÚ£¬É¾³ýÊý¾Ý¿âʧ°Ü
¡¡¡¡
¡¡¡¡1009£ºMYSQL²»ÄÜɾ³ýÊý¾Ý¿âÎļþµ¼ÖÂɾ³ýÊý¾Ý¿âʧ°Ü
¡¡¡¡
¡¡¡¡1010£ºMYSQL²»ÄÜɾ³ýÊý¾ÝĿ¼µ¼ÖÂɾ³ýÊý¾Ý¿âʧ°Ü
¡¡¡¡
&nbs ......
select `a`.`id` AS `id`,`a`.`UserName` AS `UserName`,
(case when (`a`.`sRegDate` = _utf8'1990-01-01 00:00:00.0') then _utf8'' else cast(date_format(`a`.`sRegDate`,_utf8'%Y-%m-%d %H:%i:%S') as char charset utf8) end) AS `sRegDate`,(case when (`a`.`feeendtime` = _utf8'1990-01-01 00:00:00.0') then _ut ......