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

MySQL¶Ô±ê×¼SQLµÄÀ©Õ¹

MySQL·þÎñÆ÷°üº¬Ò»Ð©ÆäËûSQL DBMSÖв»¾ß±¸µÄÀ©Õ¹¡£×¢Ò⣬Èç¹ûʹÓÃÁËËüÃÇ£¬½«ÎÞ·¨°Ñ´úÂëÒÆÖ²µ½ÆäËûSQL·þÎñÆ÷¡£ÔÚijЩÇé¿öÏ£¬Äã¿ÉÒÔ±àд°üº¬MySQLÀ©Õ¹µÄ´úÂ룬µ«ÈÔ±£³ÖÆä¿ÉÒÆÖ²ÐÔ£¬·½·¨ÊÇÓÓ/*... */”×¢Ê͵ôÕâЩÀ©Õ¹¡£MySQL·þÎñÆ÷Äܹ»½âÎö²¢Ö´ÐÐ×¢ÊÍÖеĴúÂ룬¾ÍÏñ¶Ô´ýÆäËûMySQLÓï¾äÒ»Ñù£¬µ«ÆäËûSQL·þÎñÆ÷½«ºöÂÔÕâЩÀ©Õ¹¡£ÀýÈ磺
SELECT /*! STRAIGHT_JOIN */ col_name from table1,table2 WHERE ...
Èç¹ûÔÚ×Ö·û“!”ºóÌí¼ÓÁË°æ±¾ºÅ£¬½öµ±MySQLµÄ°æ±¾µÈÓÚ»ò¸ßÓÚÖ¸¶¨µÄ°æ±¾ºÅʱ²Å»áÖ´ÐÐ×¢ÊÍÖеÄÓï·¨£º
CREATE /*!32302 TEMPORARY */ TABLE t (a INT);
ÕâÒâζ×Å£¬Èç¹ûÄãµÄ°æ±¾ºÅΪ3.23.02»ò¸ü¸ß£¬MySQL·þÎñÆ÷½«Ê¹ÓÃTEMPORARY¹Ø¼ü×Ö¡£
ÏÂÃæ°´Àà±ð½éÉÜÁ˸÷ÖÖMySQLÀ©Õ¹¡£
·         ´ÅÅÌÉϵÄÊý¾Ý×éÖ¯
MySQL·þÎñÆ÷»á½«Ã¿¸öÊý¾Ý¿âÓ³Éäµ½MySQLÊý¾ÝĿ¼ÏµÄ1¸öĿ¼ÖУ¬²¢½«Êý¾Ý¿âÖеıíÓ³Éäµ½Êý¾Ý¿âĿ¼ÏµÄÎļþÃû¡£Ëü¾ßÓÐÏÂÊöº¬Ò壺
o        Èç¹û²Ù×÷ϵͳµÄÎļþÃûÇø·Ö´óСд£¨Èç´ó¶àÊýUnixϵͳ£©£¬µ±MySQL·þÎñÆ÷ÔËÐÐÔÚÕâÀà²Ù×÷ϵͳÉÏʱ£¬Êý¾Ý¿âÃûºÍ±íÃûÒ²Çø·Ö´óСд¡£
o        Äã¿ÉÒÔʹÓñê×¼µÄϵͳÃüÁîÀ´±¸·Ý¡¢ÖØÃüÃû¡¢Òƶ¯¡¢É¾³ý¡¢²¢¿½±´ÓÉMyISAM»òISAM´æ´¢ÒýÇæ¹ÜÀíµÄ±í¡£ÀýÈ磬ҪÏëÖØÃüÃûMyISAM±í£¬¿ÉÖØÃüÃû±í¶ÔÓ¦µÄ.MYD¡¢.MYI¡¢ÒÔ¼°.frmÎļþ¡£
Êý¾Ý¿â¡¢±í¡¢Ë÷Òý¡¢Áлò±ðÃûÄܹ»ÒÔÊý×Ö¿ªÍ·£¨µ«»òÐí²»ÄÜÈ«²¿ÓÉÊý×Ö¹¹³É£©¡£
·         ͨÓÃÓïÑÔÓï·¨
o        ¿ÉÒÔʹÓÓ””»ò“’”À¨×¡×Ö·û´®£¬¶ø²»½öÊÇ“’”¡£
o        ÔÚ×Ö·û´®ÖÐʹÓÓ\”×÷ΪתÒå×Ö·û¡£
o        ÔÚSQLÓï¾äÖУ¬¿ÉÒÔʹÓÓdb_name.tbl_name”Óï·¨·ÃÎʲ»Í¬Êý¾Ý¿âÖÐµÄ±í¡£Ä³Ð©SQL·þÎñÆ÷ÌṩÁËÏàͬµÄ¹¦ÄÜ£¬µ«µ÷ÓøÃÓû§¿Õ¼ä³ýÍâ¡£MySQL·þÎñÆ÷²»Ö§³Ö±í¿Õ¼ä£¬ÈçÏÂÊöÓï¾äÖÐʹÓõÄÄÇÑù£º CREATE TABLE ralph.my_table...IN my_tablespace.
·         SQLÓï¾äµÄÓï·¨
o        ANALYZE TABLE£¬CHECK TABL


Ïà¹ØÎĵµ£º

sql 2005 ´æ´¢¹ý³Ì·ÖÒ³ java ´úÂë

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ ......

SQL³£ÓÃ×Ö·û´®º¯Êý

Ò»¡¢×Ö·ûת»»º¯Êý
1¡¢ASCII()
·µ»Ø×Ö·û±í´ïʽ×î×ó¶Ë×Ö·ûµÄASCII ÂëÖµ¡£ÔÚASCII£¨£©º¯ÊýÖУ¬´¿Êý×ÖµÄ×Ö·û´®¿É²»ÓÑ’À¨ÆðÀ´£¬µ«º¬ÆäËü×Ö·ûµÄ×Ö·û´®±ØÐëÓÑ’À¨ÆðÀ´Ê¹Ó㬷ñÔò»á³ö´í¡£
2¡¢CHAR()
½«ASCII Âëת»»Îª×Ö·û¡£Èç¹ûûÓÐÊäÈë0 ~ 255 Ö®¼äµÄASCII ÂëÖµ£¬CHAR£¨£© ·µ»ØNULL ¡£
3¡¢LOWER()ºÍ ......

SQLÖظ´¼Ç¼²éѯ

SQLÖظ´¼Ç¼²éѯ
1¡¢²éÕÒ±íÖжàÓàµÄÖظ´¼Ç¼£¬Öظ´¼Ç¼ÊǸù¾Ýµ¥¸ö×ֶΣ¨peopleId£©À´ÅжÏ
select * from
people
where peopleId in (select   peopleId from   people group by   peopleId
having count
(peopleId) > 1)
2¡¢É¾³ý±íÖжàÓàµÄÖظ´¼Ç¼£¬Öظ´¼Ç¼ÊǸù¾Ýµ¥¸ö×ֶΣ¨p ......

CentOSÏÂMySql 5.0.xµÄ°²×°¡¢ÓÅ»¯¼°°²È«ÉèÖÃ

 groupadd mysql
н¨Ò»¸öÃûΪmysqlµÄÓû§×é
useradd -g mysql mysql
ÔÚmysqlÓû§×éÏÂн¨Ò»¸öÃûΪmysqlµÄÓû§
gunzip ½âѹÏÂÔص½µÄ.gzÎļþ
cd mysql-VERSION
½øÈë½âѹºóµÄĿ¼
CFLAGS="-O3 -mcpu=pentium4" CXX=gcc CXXFLAGS="-O3 -march=pentium4 -felide-constructors -fno-exceptions -fno-rtti" ./configu ......

AccessÊý¾Ý¿âÖвéѯÊý×éÀàÐÍ×ֶεÄASP´úÂëSQLÓï·¨

 ½ñÌìÔÚÐÞ¸ÄÒÔÇ°¿ª·¢µÄÒ»¸öÍøÕ¾µÄʱºòÓöµ½Ò»¸öÎÊÌ⣬ÒòΪ¹¦ÄܵÄÐèÒª£¬ÒÔÇ°µÄÒ»¸öÊý×ÖÀàÐÍ×ֶθıäΪÎı¾×ֶΣ¬ÒòΪÕâ¸ö×Ö¶ÎÐèÒª°üº¬¶à¸öÀà±ðµÄID£¬ÒÔÇ°Õâ¸ö×Ö¶ÎÖ»¶ÔÓ¦Ò»¸öIDµÄ¡£
ÍøÕ¾ÊÇASP VBÓïÑԵģ¬Êý¾Ý¿âʹÓõÄÊÇAccess
ÐÞ¸ÄÊý¾ÝÀàÐÍÖ®ºóǰ̨µÄ²éѯ´úÂë¾Í²»ÄÜʹÓÃÖîÈçxID=1ÕâÖÖÌõ¼þÁË¡£ÓÉÓÚÏÖÔÚ¸Ã×ֶαäΪÎı¾ÀàÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ