Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

MysqlÎļ¯

µ¼ÈëÊý¾ÝÖ¸¶¨ÁÐ
load data local infile 'D:\\service_func_utf8.txt' into table service_func fields terminated by '\t' (service_id, func_id1, func_id2, func_id3, func_id4, func_id5, func_id6);
MYSQL½«²éѯ½á¹ûµ¼³öµ½Îļþ
select * from tablename into outfile '/tmp/test.txt';
MYSQLÁªºÏÖ÷¼ü
create   table   oldmail(
    id   varchar(200)   not   null,
    username     varchar(255)   not   null   ,
    primary   key(id,username)
)
3 mysqlµÄÖ÷¼üÎÊÌ⣺
MysqlµÄÁ½ÖÖÖ÷¼ü¡£Primary key ºÍnot null auto_incrimentÔÚ½¨Á¢mysql±íʱ£¬¸øÒ»¸ö×Ö¶ÎÌí¼ÓÁËÖ÷¼üprimary key ÔÚinsertÊý¾Ýʱ¿ÉÒÔ²»ÓÃinsertÖ÷¼ü£¬mysql»á×Ô¶¯Ìí¼Ó0£¬µ«ÊÇÔÚµÚ¶þ´ÎinsertʱûÓÐÌîдֵmysqlÊý¾Ý¿â»¹ÊÇĬÈÏÌí¼Ó0£¬»áµ¼ÖÂÓÐÖØ¸´µÄÖ÷¼ü£¬ÕâÊDz»¿ÉÒԵġ£ËùÓÐÔÚ¶¨ÒåÁËprimary keyʱ£¬ÔÚinsertÊý¾ÝʱҪ¸øÖ÷¼üÌîдֵ¡£ÔÚ½¨Á¢mysql±íʱ£¬¸øÒ»¸ö×Ö¶ÎÌí¼ÓÁËÖ÷¼ünot null auto_increment=1;ÕâÒ²ÊÇÒ»¸öÖ÷¼ü¡£Ê±×ÔÔö³¤µÄÒÔ1Ϊ¿ªÊ¼¡£Õâ¸ö×Ö¶ÎÊÇ¿ÉÒÔ²»ÓÃÌîдֵµÄ£¬mysqlÊý¾Ý¿â»á×Ô¶¯¸øÌîдֵ£¬²»»á³öÏÖprimary keyµÄ×´¿ö¡£Alter table tb add primary key(id);Alter table tb change id id int(10) not null auto_increment=1;
4 ɾ³ý×ÔÔö³¤µÄÖ÷¼üidÏÈɾ³ý×ÔÔö³¤ÔÚɾ³ýÖ÷¼ü
Alter table tb change id id int(10);//ɾ³ý×ÔÔö³¤
Alter table tb drop primary key;//ɾ³ýÖ÷½¨
ÖØÃüÃû±í
ALTER   TABLE   ¾É±íÃû   RENAME   TO   бíÃû;


Ïà¹ØÎĵµ£º

php+mysql±àÂëÎÊÌâ×ܽá

Òª²»³öÏÖÂÒÂ룬¾ÍÒª±£³ÖÊý¾Ý¿âºÍÒ³ÃæµÄ±àÂë¸ñʽһÖÂ.ÎÒÈ«²¿Ê¹ÓÃutf-8µÄ±àÂë.
Ê×ÏÈÒ³Ãæ:
 1. ½«ÎļþÓÃUE´ò¿ª,½«ÎļþÁí´æÎªUTF-8ÎÞBOM¸ñʽ.ºÜ¶à±à¼­Æ÷¶¼¿ÉÓÃ.
 2.ʹÓà header("content-type:text/html;¡¡charset=utf-8"); Ç¿ÖÆ×ª»»³Éutf-8µÄ±àÂë.
   Ò²¿ÉÒÔн¨Ò»¸öhead.php,ÈçÏÂ,ÔÚÒ³ÃæÖÐÓÃinclude( ......

mysqlÖ÷´ÓÊý¾Ý¿âͬ²½ºÍ×Ö·û¼¯ÎÊÌâ

1.mysqlÖ÷´ÓÊý¾Ý¿âͬ²½ÎÊÌâ
 
ÔÚʹÓÃmysql 5.0 Ö÷´ÓÊý¾Ý¿âͬ²½Ê±Óöµ½ÎÊÌâһЩÎÊÌ⣺
ÔÚÖ÷´ÓÊý¾Ý¿âͬ²½Ê±£¬ÎÒÃÇ¿ÉÄÜ»áÑ¡ÔñÄÄЩÊý¾Ý¿âÒªÇóͬ²½£¬¶øÄÇЩÊý¾Ý¿âºöÊÓ£¬ÕâÁ½¸ö¹¦ÄÜÊÇ¿¿/etc/my.cnfÎļþÖеÄÁ½¸ö¼üÃû binlog_do_db ºÍ binlog_ignore_db À´ÊµÏÖµÄ
binlog_do_db = ÌîдÐèҪͬ²½µÄÊý¾Ý¿â£¬¶à¸öÊý¾Ý¿âÔòÓÃ&lsqu ......

Tomcat5+MysqlÎÄÖÐÂÒÂëÎÊÌâµÄ½â¾ö·½·¨ (ת)


Tomcat ÏÂ×îÈÝÒ×µ½µÄÎÊÌâ¾ÍÊÇÖÐÎÄÂÒÂëÎÊÌâÁË , ÏÂÃæ¾ÍÀ´Ì¸Ì¸ÎÒÔÚ Windows +Tomcat5 Ïµ÷ÊÔ JSP ³ÌÐòʱ , ËùÅöµ½µÄÎÊÌâÒÔ¼°½â¾ö°ì·¨¡£
       Õâ´Îµ÷ÊÔËùÓöµ½µÄÂÒÂëÎÊÌâÖ÷ÒªÓÐÈýÀࣺ
Ò»¡¢ Ò³Ãæ×Ö·ûÂÒÂë¡£
¼´Õû¸öÒ³Ãæ³öÏÖºº×ÖÂÒ ......

MySQLÐÐËøÉîÈëÑо¿

     
×öÏîĿʱÓÉÓÚÒµÎñÂß¼­µÄÐèÒª£¬±ØÐë¶ÔÊý¾Ý±íµÄÒ»Ðлò¶àÐмÓÈëÐÐËø£¬¾Ù¸ö×î¼òµ¥µÄÀý×Ó£¬Í¼Êé½èÔÄϵͳ¡£¼ÙÉè
id=1
µÄÕâ±¾Êé¿â´æÎª
1
£¬µ«ÊÇÓÐ
2
¸öÈËͬʱÀ´½èÕâ±¾Ê飬´Ë´¦µÄÂß¼­Îª
Select restnum from book where id =1 ;
-- Èç¹û restnum ´óÓÚ 0 £¬Ö´ÐÐ update
Update boo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ