MySQL ÊÂÎñ ´æ´¢¹ý³Ì ʵÀý
USE dxdb;
DELIMITER //
#»ñÈ¡Á÷Ë®ºÅ
DROP PROCEDURE IF EXISTS get_sid;
CREATE PROCEDURE get_sid(para_domain VARCHAR(20), out para_sid BIGINT UNSIGNED)
BEGIN
START TRANSACTION;
UPDATE t_sid SET sID=sID+1 WHERE cDomain=para_domain;
SELECT sID INTO para_sid from t_sid WHERE cDomain=para_domain;
COMMIT;
END
//
DELIMITER ;
Ïà¹ØÎĵµ£º
×÷/ÒëÕߣºÒ¶½ðÈÙ£¨Email: £©£¬À´Ô´£ºhttp://imysql.cn£¬×ªÔØÇë×¢Ã÷×÷/ÒëÕߺͳö´¦£¬²¢ÇÒ²»ÄÜÓÃÓÚÉÌÒµÓÃ;£¬Î¥Õ߱ؾ¿¡£
Ê×ÏÈ,ÕâƬÎÄÕ´¿´âÊÇÎҵĸöÈ˾Ñé̸֮,ÊÊÓÃÓÚÎÒ³£¼ûµÄ»·¾³¼°ÏîÄ¿ÖÐ.
¸öÈ˽¨Òé,Êý¾Ý¿â×Ö·û¼¯¾¡Á¿Ê¹ÓÃutf8(HTMLÒ³Ãæ¶ÔÓ¦µÄÊÇutf-8),ÒÔʹÄãµÄÊý¾ÝÄܺÜ˳ÀûµÄʵÏÖǨÒÆ,ÒòΪutf8×Ö·û¼¯ÊÇÄ¿Ç°×îÊʺÏÓÚÊ ......
mysql »ù±¾ÃüÁî
µÚÒ»ÕС¢mysql·þÎñµÄÆô¶¯ºÍÍ£Ö¹
net stop mysql
net start mysql
µÚ¶þÕС¢µÇ½mysql
Óï·¨ÈçÏ£º mysql -uÓû§Ãû -pÓû§ÃÜÂë
¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÄãÊäÈëÃÜÂ룬ÊäÈë12345£¬È»ºó»Ø³µ¼´¿É½øÈëµ½mysqlÖÐÁË£¬mysqlµÄÌáʾ·ûÊÇ£º
mysql>
×¢Ò⣬Èç¹ûÊÇÁ¬½Óµ½ÁíÍâµÄ»úÆ÷ÉÏ£¬ÔòÐèÒª ......
CREATE PROCEDURE pro_page(
in _sql varchar(1000),
in _order varchar(1000),
in _pagecurrent int,
in _pagesize int
)
BEGIN
if _pagesize<=1 then
set _pagesize=20;
end if;
if _pagecurrent < 1 then
set _pagecurrent = 1;
&n ......
MySQLµÄ×Ö·û¼¯Ö§³Ö(Character Set Support)ÓÐÁ½¸ö·½Ã棺
×Ö·û¼¯(Character set)ºÍÅÅÐò·½Ê½(Collation)¡£
¶ÔÓÚ×Ö·û¼¯µÄÖ§³Öϸ»¯µ½Ëĸö²ã´Î:
·þÎñÆ÷(server)£¬Êý¾Ý¿â(database)£¬Êý¾Ý±í(table)ºÍÁ¬½Ó(connection)¡£
1.MySQLĬÈÏ×Ö·û¼¯
MySQL¶ÔÓÚ×Ö·û¼¯µÄ ......
×÷Õß Ð¡ºÉ||¡¾×ªÔØʱÇëÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕÂÔʼ³ö´¦ºÍ×÷ÕßÐÅÏ¢¡¿
· ÓÀ¾ÃÁ´½Ó: http://www.oracleblog.cn/useful-script/prompt-of-sqlplus/
misc@ORALOCAL(192.168.0.49)>
Èç¹ûÄãÒ²ÏëºÍÎÒÒ»Ñù£¬ÔÚsqlplusµÇ¼Êý¾Ý¿âµÄʱºò£¬ÄÜÌáʾ²»ÉÙÏñÉÏÃæÕâÑùÏêϸµÇ¼µÄÐÅÏ¢£º
1.µÇ¼µÄÓû§Ãû¡£µ±ÄãµÄÊý¾Ý¿âÖÐÓжà¸ö ......