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

MySQL µÄ´¥·¢Æ÷¡¢´æ´¢¹ý³Ì¡¢º¯Êý¡¢ÊÓͼʵÑé

    ±¾ÊµÑéÍê³ÉÈçϽá¹û£º
    0. testÊý¾Ý¿â,userinfo Óû§ÐÅÏ¢±í ºÍ userinfolog Óû§ÐÅÏ¢ÈÕÖ¾±í
    1. ½¨Á¢Ò»¸öuserinfo±íÐÂÔö¼Ç¼ʱµÄ´¥·¢Æ÷,½«ÐÂÔöÈÕÖ¾¼ÓÈëµ½userinfolog
    2. ½¨Á¢Ò»¸öÏòuserinfo±íÐÂÔö¼Ç¼µÄ´æ´¢¹ý³Ì
    3. ¸ù¾Ýuserinfo±íµÄ³öÉúÈÕÆÚ×Ö¶Î,ÎÒÃǽ«½¨Á¢Ò»¸ö¼òµ¥ËãµÃÄêÁäµÄ×Ô¶¨Ò庯Êý
    4. ´´½¨Ò»¸öuserinfoµÄÊÓͼ,µ÷ÓÃÄêÁ亯Êý
    0.×¼±¸Ïà¹Ø±í
    mysql> use test;
    mysql> create table userinfo(userid int,username varchar(10),userbirthday date);
    mysql> create table userinfolog(logtime datetime,loginfo varchar(100));
    mysql> describe userinfo;
    1.´¥·¢Æ÷
    mysql> delimiter |
    mysql> create trigger beforeinsertuserinfo
        -> before insert on userinfo
        -> for each row begin
        ->   insert into userinfolog values(now(),CONCAT(new.userid,new.username));
        -> end;
        -> |
    mysql> delimiter ;
    mysql> show triggers;
    2.´æ´¢¹ý³Ì
    mysql> delimiter //
    mysql> create procedure spinsertuserinfo(puserid int,pusername varchar(10),puserbirthday date)
        -> begin
        ->  insert into userinfo values(puserid,pusername,puserbirthday);
        -> end;
        -> //
    mysql> show procedure status like 'spinsertuserinfo';
    mysql> call spinsertuserinfo(1,'zhangsan',current_date);
  &n


Ïà¹ØÎĵµ£º

Ò»ÖÖ²»´íµÄ´ÓSQLתMysqlÊý¾Ý¿âµÄ·½·¨

Äê³õµÄʱºòÒ»Ö±ÔÚ×öÒ»¸öÍøÕ¾MSSQL2000->MySQL5µÄǨÒƹ¤×÷£¬ÒòΪ²ÉÓÃÁ˲»Í¬µÄ³ÌÐòϵͳ£¬ËùÒÔÖ÷ÒªÎÊÌâÔÚÊý¾ÝµÄǨÒÆ¡£ÓÉÓÚ2¸öϵͳÊý¾Ý¿â½á¹¹²îÒì·Ç³£´ó£¬²»·½±ã²ÉÈ¡SQLSERVERÀïµ¼ÈëMYSQLµÄODBCÊý¾ÝÔ´µÄ¹¦ÄÜ£¨Ò²²»ÍƼöÕâô×ö£¬×Ö¶ÎÀàÐ͵Ȳ»Í¬µã»á¸ãËÀÈ˵ġ«£©£¬Òò´Ë¾ÍÔÚWINDOWSÏÂ×Ô¼ºÐ´PHP½Å±¾´ÓSQLSERVERÀï¶ÁÊý¾Ý£¬È»ºó°´ÕÕ ......

ÈçºÎ±£»¤MySQLÖеÄÖØÒªÊý¾Ý

ÔÚÈÕ³£µÄ¹¤×÷ÖУ¬±£»¤Êý¾ÝÃâÊÜδÊÚȨÓû§µÄÇÖ·¸ÊÇϵͳ¹ÜÀíÔ±Ìرð¹ØÐĵÄÎÊÌâ¡£Èç¹ûÄãÄ¿Ç°ÓõÄÊÇMySQL£¬¾Í¿ÉÒÔʹÓÃһЩ·½±ãµÄ¹¦ÄÜÀ´±£»¤ÏµÍ³£¬À´´ó´ó¼õÉÙ»úÃÜÊý¾Ý±»Î´ÊÚȨÓû§·ÃÎʵķçÏÕ¡£
ÆóÒµ×îÓмÛÖµµÄ×ʲúͨ³£ÊÇÆäÊý¾Ý¿âÖеĿͻ§»ò²úÆ·ÐÅÏ¢¡£Òò´Ë£¬ÔÚÕâЩÆóÒµÖУ¬Êý¾Ý¿â¹ÜÀíµÄÒ»¸öÖØÒª²¿·Ö¾ÍÊDZ£»¤ÕâЩÊý¾ÝÃâÊÜÍⲿ¹¥»÷£ ......

MySQL Query Cache

A Practical Look at the MySQL Query Cache
http://dev.mysql.com/tech-resources/articles/mysql-query-cache.html
Êý¾Ý¿â»º´æ²ßÂÔ£º
£¨1£©»º´æ¾­³£±»Ê¹ÓõÄÊý¾Ý
£¨2£©»º´æ¾­³£Ö´ÐеÄSQLºÍ´æ´¢¹ý³Ì´úÂë
£¨3£©»º´æÊý¾Ý¿âÔªÊý¾ÝÐÅÏ¢£¬°üÀ¨£º¶ÔÏó½á¹¹»º´æ¡¢°²È«ÐÅÏ¢µÈ
mysqlÒýÇæËùʹÓõĻº´æ£º
£¨1£©myisam:key b ......

jBPM4ÖÐÅäÖÃMySQLµÄhibernate·½ÑÔ

×î³õµÄjbpm.hibernate.cfg.xmlÖУ¬¶ÔMySQLµÄ·½ÑÔÅäÖóÉÁËorg.hibernate.dialect.MySQLDialect£¬·¢²¼Á÷³ÌµÄʱºòÓöµ½ÏÂÊö´íÎó£º
Cannot delete or update a parent row: a foreign key constraint fails
Could not synchronize database state with session
½«MySQL·½ÑÔÐÞ¸ÄΪorg.hibernate.dialect.MySQLInnoDBDialectÎÊ ......

MySQL Ë÷Òý¸ÅÊö hust ei

±¾ÎĽéÉÜÁËÊý¾Ý¿âË÷Òý£¬¼°ÆäÓÅ¡¢È±µã¡£Õë¶ÔMySQLË÷ÒýµÄÌص㡢ӦÓýøÐÐÁËÏêϸµÄÃèÊö¡£·ÖÎöÁËÈçºÎ±ÜÃâMySQLÎÞ·¨Ê¹Óã¬ÈçºÎʹÓÃEXPLAIN·ÖÎö²éѯÓï¾ä£¬ÈçºÎÓÅ»¯MySQLË÷ÒýµÄÓ¦Óᣱ¾ÎÄÕª×Ô¡¶MySQL 5ȨÍþÖ¸ÄÏ¡·(3rd)µÄ8.9½Ú¡£(2007.07.05×îºó¸üÐÂ)
    Ë÷ÒýÊÇÒ»ÖÖÌØÊâµÄÎļþ(InnoDBÊý¾Ý±íÉϵÄË÷ÒýÊDZí¿Õ¼äµÄÒ»¸ö× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ