mysql ÓëOracle º¯Êý¶Ô±È
Oracleº¯ÊýºÍmysqlº¯Êý±È½Ï
1. OracleÖеÄto_number()ת»»³ÉÊý×Ö£»
Oracle> Select to_number(‘123’) from dual; ----- 123;
select to_char(33) from dual;---- 33;
Mysql> Select conv(‘123’,10,10); ---- 123;
Select cast(‘123’ as signed integer);--- 123
Select cast(‘-123’ as signed integer);--- -123
select cast(33 as char(2) ); ------- 33£»
select char(33);-------------------- !;(ascll)
¶ÔÓ¦µÄmysqlº¯ÊýÊÇconv(N,from_base,to_base)£¬ÔÚ²»Í¬µÄÊý×Ö»ùÖ®¼ä±ä»»Êý×Ö¡£·µ»ØÊý×ÖNµÄ×Ö·û´®Êý×Ö£¬´Ófrom_base»ù±ä»»Îªto_base»ù£¬Èç¹ûÈκβÎÊýÊÇNULL£¬·µ»ØNULL¡£²ÎÊýN½âÊÍΪһ¸öÕûÊý£¬µ«ÊÇ¿ÉÒÔÖ¸¶¨ÎªÒ»¸öÕûÊý»òÒ»¸ö×Ö·û´®¡£×îС»ùÊÇ2ÇÒ×î´óµÄ»ùÊÇ36¡£Èç¹ûto_baseÊÇÒ»¸ö¸ºÊý£¬N±»ÈÏΪÊÇÒ»¸öÓзûºÅÊý£¬·ñÔò£¬N±»µ±×÷ÎÞ·ûºÅÊý¡£ CONVÒÔ64λµã¾«¶È¹¤×÷¡£
castÖеÄsigned±íʾÓзûºÅÊý£»
2. ËÄÉáÎåÈ뺯ÊýÇø±ð
Oracle> select floor(12.89*10)/10 from dual;--12.8
select ceil(12.82*10)/10 from dual;--12.9
select round(12.86*10)/10 from dual;--12.9
select round(12.84*10)/10 from dual;--12.8
mysql>
Ïà¹ØÎĵµ£º
ÔÚÊý¾Ý¿â±íÖУ¬¶Ô×ֶν¨Á¢Ë÷Òý¿ÉÒÔ´ó´óÌá¸ß²éѯËٶȡ£¼ÙÈçÎÒÃÇ´´½¨ÁËÒ»¸ö
mytable
񡜧
CREATE TABLE mytable(
ID INT NOT NULL,
username VARCHAR(16) NOT NULL
);
ÎÒÃÇËæ»úÏòÀïÃæ²åÈëÁË
10000
Ìõ¼Ç¼£¬ÆäÖÐÓÐÒ»Ìõ£º
5555, admin
¡£
ÔÚ²éÕÒ
username="admin"
µÄ¼Ç¼
SELECT * from mytable WH ......
ÈçºÎÌá¸ßmysql load
data
infile
µÄËÙ¶È
²âÊÔÊý¾Ý2.5G£¬¹²ÓÐÊý¾Ý9427567Ìõ¡£ÓõÄmysqlµÄlarge·þÎñÆ÷µÄÅäÖá£
load
Ò»´ÎÐèÒª´ó¸Å10·ÖÖÓ×óÓÒ¡£
½¨µÄ±íÓõÄÊÇMYISAM£¬µ÷ÕûÁ˼¸¸ösessionµÄ²ÎÊýÖµ
SET SESSION BULK_INSERT_BUFFER_SIZE=256217728;
SET SESSION MYISAM_SORT_BUFFER_SIZE=256217728;
ÔËÐнá¹ûÈçÏÂ
Qu ......
mysql alter Óï¾äÓ÷¨,Ìí¼Ó¡¢Ð޸ġ¢É¾³ý×ֶεÈ
//Ö÷¼ü549830479
alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);
//Ôö¼ÓÒ»¸öÐÂÁÐ549830479
alter table t2 add d timestamp;
alter table infos add ex tinyint not null default ......
²î²»¶àÔÚÒ»ÄêÇ°£¬Ð´¹ýһƪÎÄÕ½éÉܽ«MySQLÊý¾ÝÓ³Éäµ½Memcached£¬µ±Ê±MySQLºÍMemcached Functions for MySQL¶¼»¹²»¹»³ÉÊ죬ʱ¹ýÒ»Ä꣬Memcached Functions for MySQLÉý¼¶µ½ÁË0.8°æ±¾£¬¶øMySQLÒ²·¢²¼ÁËGA°æ±¾£¬¼ÓÉϺܶàÅóÓÑ·´Ó¦Ç°Ò»ÆªÎÄÕÂÖеÄʵÏÖËûÃÇÒòÖÖÖÖÔÒòûÄܳɹ¦£¬ÓÚÊDZãÓÐÁËÕâƪÎÄÕ£¬¾Íµ±ÊÇÉÏһƪÎÄÕµÄÉý¼¶°æ±¾°É¡ ......
1¡¢°²×°Tomcat
JDBCÁ¬½Ó³ØÅäÖõĵÚÒ»²½ÊÇÏÂÔغͰ²×°Tomcat¡£²Î¿¼Tomcat for window µÄ°²×°Ïòµ¼£¬»ù±¾Ö±½Ó°²×°¼´¿É£¬×¢Ò⣺°²×°Ê±»áÌáʾÊäÈë¹ÜÀíÓû§ÃûºÍÃÜÂ룬ÕâÊÇÒÔºó»áÓõ½µÄÓû§ÃûºÍÃÜÂ룬Çмǡ£
2¡¢°²×°MySql
ĬÈÏ°²×°¼´¿É¡£
3¡¢Ê¹ÓÃTomcatµÄWeb¹ÜÀíÓ¦ÓÃÅäÖÃÊý¾ÝÔ´
Æô¶¯Tomcat·þÎñÆ÷£¬´ò¿ªä¯ÀÀÆ÷£¬ÊäÈëhttp://loca ......