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

mysqlÖÐcountº¯Êý×¢ÒâÊÂÏî

񡜧
CREATE TABLE `user` (
  `id` int(5) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(10) DEFAULT NULL,
  `password` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
ÆäÖÐÓÐÊý¾ÝΪ£º
1 name1 123456
2 name2 123456
3 name3 123456
4 name4  NULL
ÒÔÏÂÈý¸ö²éѯ·µ»Ø¼¸ÄØ£¿
£¨1£©select count(*) from `user`
£¨2£©select count(name) from `user`
£¨3£©select count(password) from `user`
´ð°¸ÊÇ£º4,4,3
ÒòΪ£º
£¨1£©count(*)ÊǶÔÐÐÊýÄ¿½øÐмÆÊý£¬ËùÒÔµ±È»ÊÇ4
£¨2£©count(column_name)ÊǶÔÁÐÖв»Îª¿ÕµÄÐнøÐмÆÊý£¬ËùÒÔcount(name)=4£¬¶øcount(password)=3


Ïà¹ØÎĵµ£º

MySQL ClusterÅäÖÃstep by step

MySQL ClusterÅäÖÃstep by step
À´Ô´£ºhttp://space.itpub.net/15415488/viewspace-620903
¹«Ë¾ÓиöÏîÄ¿ÊDzâÊÔdistributed DB£¬ÆäÖÐÒ»ÏîÊÇÕë¶ÔMySQL ClusterµÄ²âÊÔ¡£
ÓÚÊÇ»¨ÁËÁ½Ììʱ¼ä×°»úÆ÷ºÍÅäÖÃMySQL Cluster¡£Õû¸ö¹ý³Ì»¹ÊDZȽÏ˳ÀûµÄ£¬µ±È»Èç¹û¶ÔMySQL³£ÓÃÃüÁî±È½ÏÊìϤµÄ»°»á¸ü˳Àû¡£
ÁôÏÂstep by stepÅä ......

mysqlºÍoracle·ÖÒ³×¢Òâµã

ÕâÀïÊ×ÏÈ˵ÏÂoracle·ÖÒ³²»Ïñmysql·ÖÒ³ÄÇô¼òµ¥Ö±½Ólimit ¾Í¿ÉÒÔÁË.
mysql£ºsql ="select * from talbe limit 0,10";
µÚÒ»¸öÊý±íʾϱ꣬¾ÍÊÇ´ÓµÚ¼¸ÌõÊý¾Ý¿ªÊ¼£¬
µÚ¶þ¸öÊý±íʾÿҳÏÔʾ¶àÉÙÌõÊý¾Ý£¬¿ÉÒÔ˵Êǵ±ÄãÈ·¶¨Ã¿Ò³ÏÔʾ¶àÉÙÐÐʱºò£¬Ëü¾ÍÊÇÒ»¸ö¹Ì¶¨µÄÊý¡£
ÕâÀïÐèҪעÒâµÄÊÇ£¬mysqlµÄ·ÃÎÊϱêÊÇ´Ó0¿ªÊ¼µÄ¡£Õ ......

mysql ÖеÄ×Ö·û´®Á¬½Ó CONCAT(str1,str2,...)

·µ»ØÀ´×ÔÓÚ²ÎÊýÁ¬½áµÄ×Ö·û´®¡£Èç¹ûÈκβÎÊýÊÇNULL£¬·µ»ØNULL¡£¿ÉÒÔÓг¬¹ý2¸öµÄ²ÎÊý¡£Ò»¸öÊý×Ö²ÎÊý±»±ä»»ÎªµÈ¼ÛµÄ×Ö·û´®ÐÎʽ¡£
mysql> select CONCAT('My', 'S', 'QL');
-> 'MySQL'
mysql> select CONCAT('My', NULL, 'QL');
-> NULL
mysql> select CONCAT(14.3);
-> '14.3'
È磺update test set ......

ʵ¼ù¾­Ñé»ã¼¯³ÉµÄMySQLÓ¦ÓÃÖ¸ÄÏ


 
¡¾ÊéÃû¡¿¸ßÐÔÄÜMySQL£¨µÚ¶þ°æ£©
¡¾Ô­ÊéÃû¡¿High Performance MySQL, second edition
¡¾×÷Õß¡¿Baron Schwartz£¬Peter Zaitsev£¬Vadim
Tkachenko£¬Jeremy D.Zawodny£¬Arjen Lentz£¬Derek
J.Balling  Öø
¡¾ÒëÕß¡¿ÍõС¶« Àî¾ü ¿µ½¨Ñ« Òë
¡¾³ö°æÉç¡¿µç×Ó¹¤Òµ³ö°æÉç     
¡¾ÊéºÅ¡¿978- ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ