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

MYSQL Êý¾Ý½ØÈ¡

MYSQL ½ØÈ¡Ò»¸öÊý¾Ý±íÖÐ,ijһ¸ö×Ö¶Î(fulltext) µÄÇ°Èý°Ù¸ö×Ö·û,·Åµ½¸Ã±íÏÂÁíÒ»¸ö×Ö¶Î(introtxt)Àï.
ÇóʵÏÖÕâ¸öЧ¹ûµÄÃüÁî
SQL code:
update ±í set introtxt=left(`fulltext`,300);


¶¥£¬Ñ§Ï°

SQL code:
UPDATE TB
SET introtxt=SUBSTR(fulltext,1,300)
WHERE LENGTH(fulltext)>=300

³¤¶ÈСÓÚ300µÄ²»´¦Àí

SQL code:
UPDATE TB
SET introtxt=CASE
WHEN LENGTH(fulltext)>=300
THEN SUBSTR(fulltext,1,300)
ELSE fulltext
END

fulltext³¤¶ÈСÓÚ300ʱ£¬¾ÍÈ¡fulltextµÄÖµ

´ÓÂ¥Ö÷µÄÐèÇó¿´À´£¬¹À¼Æ§Ö÷µÄÁв»ÊÇcharÀàÐ͵ģ¬Ó¦¸ÃÊÇvarchar»òtextÀàÐ͵ģ¬ËùÒÔ£¬Ö±½ÓÕâÑù¾Í¿ÉÒÔ£º

ÒýÓÃ
SQL codeupdate ±íset introtxt=left(`fulltext`,300);


ÒýÓÃMYSQL ½ØÈ¡Ò»¸öÊý¾Ý±íÖÐ,ijһ¸ö×Ö¶Î(fulltext) µÄÇ°Èý°Ù¸ö×Ö·û,·Åµ½¸Ã±íÏÂÁíÒ»¸ö×Ö¶Î(introtxt)Àï.


½ö´ÓÕâ¸ö˵Ã÷ÉÏÀ´¿´¡£Ò»Â¥µÄ update ±í set introtxt=left(`fulltext`,300); Ó¦¸Ã¾Í¿ÉÒÔÁË¡£

Ê÷¸ç ºÜÑϽ÷£¡ÏòÊ÷¸çѧϰ£¡

update ±í set introtxt=left(`fulltext`,300);
ÊÇÒª¿¼ÂÇ×Ö¶


Ïà¹ØÎÊ´ð£º

Winform+MySQL×öÏîÄ¿

Winform+MySQL×öÏîÄ¿£¬ÔÚ×¢ÖØÐÔÄܵÄÇé¿öÏ£¬ÎÒ¸ÃÈçºÎÈ¥Íê³ÉÕâÀàÐ͵ÄÏîÄ¿ÄØ£¡
Çë¸÷λ¸øÒÔÌáʾ¡£
ÄãÕâ¸ö·¶Î§Ì«¹ãÁË£¬ÎÒ˵2µãÖØÒªµÄ°É
1.WINFORM³ÌÐòÊǵ¥¶ÀÔËÐеÄCS³ÌÐò£¬ºÍBS²»Í¬£¬BSµÄѹÁ¦Ê¼ÖÕ¶¼ÔÚSERVERÉϵģ¬¶ÔC ......

Á¬½ÓMySQLʱUnknown columnÎÊÌ⣬Çó¸ßÊÖ½â´ð

import java.sql.*;

public class A
{
public static void main(String[] args)
{
try
{
Class.forName("com.mysql.jdbc.Driver");
String url="jdbc:mysql://localhost ......

mysql ²éѯÓï¾ä

select id,dtime,zt,optype( Èç¹ûoptype=0½«±¾ÌõÊý¾Ý²åÈëµ½table1±íÖУ¬Èç¹ûoptype=1ÒÔdtimeºÍztΪÌõ¼þÖ´ÐÐÒ»Ìõ²éѯÓï¾ä ) from table
ʵÏÖÕâ¸öÒªÇóµÄÓï·¨Ôõôд
Ò»ÌõSQLÓï¾ä¹À¼Æ¸ã²»¶¨¡£µÈ¥Ϻ÷½·¨£¡

Èç¹ ......

mysql Æô¶¯²»ÆðÀ´

windows xp·þÎñÖÐÆô¶¯mysql 

Ìáʾ±¾µØ¼ÆËã»úÎÞ·¨Æô¶¯mysql·þÎñ

´íÎó3 ϵͳÕÒ²»µ½Ö¸¶¨Â·¾¶

cmdÀïÔËÐÐ

error  2003:Can't  connect  to  MySQL  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ