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

MySQLÃüÁî

1.Á¬½ÓMySQLÊý¾Ý¿â
echo on¡¡¡¡
cd c:\Program Files\MySQL\MySQL Server 5.2\bin
mysql -uroot -ppass
2¡¢ÏÔʾÊý¾Ý¿âÁÐ±í¡£
show databases;
3¡¢ÏÔʾ¿âÖеÄÊý¾Ý±í£º
use mysql; //´ò¿ª¿â£¬
show tables;
4¡¢ÏÔʾÊý¾Ý±íµÄ½á¹¹£º
describe ±íÃû;
5¡¢½¨¿â£º
create database ¿âÃû;
6¡¢½¨±í£º
use ¿âÃû;
create table ±íÃû (×Ö¶ÎÉ趨Áбí);
7¡¢É¾¿âºÍɾ±í:
drop database ¿âÃû;
drop table ±íÃû;
8¡¢½«±íÖмǼÇå¿Õ£º
delete from ±íÃû;
9¡¢ÏÔʾ±íÖеļǼ£º
select * from ±íÃû;


Ïà¹ØÎĵµ£º

Tomcat+MySQl JDBCÁ¬½Ó³ØµÄÅäÖÃ

1¡¢°²×°Tomcat
JDBCÁ¬½Ó³ØÅäÖõĵÚÒ»²½ÊÇÏÂÔغͰ²×°Tomcat¡£²Î¿¼Tomcat for window µÄ°²×°Ïòµ¼£¬»ù±¾Ö±½Ó°²×°¼´¿É£¬×¢Ò⣺°²×°Ê±»áÌáʾÊäÈë¹ÜÀíÓû§ÃûºÍÃÜÂ룬ÕâÊÇÒÔºó»áÓõ½µÄÓû§ÃûºÍÃÜÂ룬Çмǡ£
2¡¢°²×°MySql
ĬÈÏ°²×°¼´¿É¡£
3¡¢Ê¹ÓÃTomcatµÄWeb¹ÜÀíÓ¦ÓÃÅäÖÃÊý¾ÝÔ´
Æô¶¯Tomcat·þÎñÆ÷£¬´ò¿ªä¯ÀÀÆ÷£¬ÊäÈëhttp://loca ......

Çë×¢ÒâMYSQLÓï¾äÖеÄÒýºÅ

SQL #1: select * from uchome_feed where uid in('0',501...) order by dateline desc limit 0,50;
SQL #2: select * from uchome_feed where uid in(0,501...) order by dateline desc limit 0,50;
SQL #1  ÊÇCSDN ¸öÈË¿Õ¼ä»ñÈ¡¸öÈ˶¯Ì¬µÄSQL£¬ÊôUCHÔ­°æSQL¡£
SQL #2 ÊÇÈ¥µôµ¥ÒýºÅ(SQL #1ÖкìÉ«²¿·Ö)ºóµÄSQL£¬Á½¸ ......

ͨ¹ý·ÖÇø£¨Partition£©ÌáÉýMySQLÐÔÄÜ

½ñÌìÕâô¼¤¶¯ÓÖÏëдÎÄÕµÄÔ­ÒòÊÇMySQL5.1µÄ·¢²¼´øÀ´ÁËÉè¼Æ³¬Ç¿¶¯Á¦Êý¾Ý¿âµÄÇ¿ÓÐÁ¦µÄÎäÆ÷£¬ÈκÎMySQLµÄDBA¶¼Ó¦¸Ã¾¡¿ìѧϰ²¢Ê¹ÓÃËü¡£ÎÒ¾õµÃÈç¹û­ÄܺܺõÎʹÓÃÕâ¸ö5.1°æ´øÀ´µÄÐÂÌØÐÔ£¬DBA¿ÉÒÔʹ×Ô¼º¹ÜÀíµÄVLDB£¨²»ÖªµÀʲôÊÇVLDB£¿¸æËßÄ㣬ÊǺôóºÃ´óµÄÊý¾Ý¿âµÄÒâ˼£¬Very Large DB£©»òÊý¾Ý²Ö¿âÆæ¼£°ãµÄ»ñµÃ¾Þ´óµÄÐÔÄÜÌáÉý ......

mysql´æÖü¹ý³Ì

## **********first test,procedure**********
#<1>
use testprocedure;
delimiter //
create procedure simpleproce1 (out par1 int)
begin
 select count(*) into par1 from proce;
end
//
delimiter ;
call simpleproce1(@a);
select @a;
#<2>,ÿ´ÎÖ»Óе¥Ò»µÄÐпÉÒÔ±»È¡»Øselect id,name i ......

MySql °´Ê±¼ä¶Î²éѯÊý¾Ý·½·¨


¸ñʽΪ2008-06-16
²éѯ³öµ±ÌìÊý¾Ý£º
SELECT * from `table` WHERE date(ʱ¼ä×Ö¶Î) = curdate();
²éѯ³öµ±ÔÂ×ֶΣº
SELECT *
from `table`
WHERE month( ʱ¼ä×Ö¶Î) = month( now( ) ) ;
ʱ¼ä¸ñʽΪ1219876…… UNIXʱ¼ä£¬Ö»ÒªÓ¦ÓÓfrom_UNIXTIME( )”º¯Êý
ÀýÈç²éѯµ±Ô£º
SELECT ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ