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

mysqlÊý¾Ý¿âµÄµ¼Èëµ¼³ö

Ò»¡¢MYSQLµÄµ¼³ö
½øÈëmysql°²×°Ä¿Â¼£¬½øÈëbin
ÔÚÃüÁîÐÐģʽÏ´òÈ룺
 ³ÌÐò´úÂë
mysqldump -u root -p hibernate > c:/hibernate.sql
ÆäÖÐ-u ±íʾÓû§
    -p±íʾÓû§ÐèÒªÈÏÖ¤
    hibernate±íʾҪµ¼³öµÄÊý¾Ý¿â
    > c:/hibernate ±íʾ½«Êý¾Ý¿âÎļþdumpµ½cÅ̵Ähibernate.sqlÎļþµ±ÖÐ
¶þ¡¢MYSQLµÄµ¼Èë
½øÈëmysql¿ØÖÆ̨£¬´´½¨Ò»¸öеÄÊý¾Ý¿â£¬Êý¾Ý¿âÃûÀýÈç½Ðhibernate
 ³ÌÐò´úÂë
mysql -u root -p hibernate < c:/hibernate.sql
Í˳öÖ®ºó£¬ÔÚmysql/binĿ¼£¬ÊäÈëÒÔÏÂÃüÁî
 ³ÌÐò´úÂë
mysql -u root -p hibernate < c:/hibernate.sql


Ïà¹ØÎĵµ£º

MySQLÓï¾äÓÅ»¯µÄ»ù±¾Ô­Ôò

MySQLÓï¾äÓÅ»¯µÄ»ù±¾Ô­Ôò£º 
¡ô1¡¢Ê¹ÓÃË÷ÒýÀ´¸ü¿ìµØ±éÀú±í¡£ 
ȱʡÇé¿öϽ¨Á¢µÄË÷ÒýÊÇ·ÇȺ¼¯Ë÷Òý£¬µ«ÓÐʱËü²¢²»ÊÇ×î¼ÑµÄ¡£ÔÚ·ÇȺ¼¯Ë÷ÒýÏ£¬Êý¾ÝÔÚÎïÀíÉÏËæ»ú´æ·ÅÔÚÊý¾ÝÒ³ÉÏ¡£ºÏÀíµÄË÷ÒýÉè¼ÆÒª½¨Á¢ÔÚ¶Ô¸÷ÖÖ²éѯµÄ·ÖÎöºÍÔ¤²âÉÏ¡£Ò»°ãÀ´Ëµ£º 
a.ÓдóÁ¿Öظ´Öµ¡¢ÇÒ¾­³£Óз¶Î§²éѯ£¨ > ,< £¬> =,< ......

Mysql ѧϰ±Ê¼Ç

 ÏÔʾËùÓÐÊý¾Ý¿â show databases;
 ´´½¨Êý¾Ý¿â create dababase stu;
 É¾³ýÊý¾Ý¿âdrop database stu;
 Çл»µ½Êý¾Ý¿âuse stu;
 È¡µÃµ±Ç°µÄÊý¾Ý¿â,´ø£¨£©±íʾº¯Êý:select database();
´´½¨±í£¨ÒªÇл»µ½Êý¾Ý¿âÖУ©
mysql> create table stu_info(
   
-> stu_id int(8) ......

mysql Ð޸ıí½á¹¹

1. mysql Ð޸ıíÃû×Ö
    ALTER TABLE t1 RENAME t2;
2. ÐÞ¸ÄÁеÄÃû×Ö
    >ALTER TABLE stock CHANGE COLUMN stock_id id INT(6);
3. Ôö¼ÓÁÐ
    >ALTER TABLE ab ADD COLUMN id INT(3);
4. ¼õÉÙÁÐ
   >ALTER TABLE ab DROP COLUMN id;
5. ÐÞ¸ÄÁ ......

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ºÅ