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>
Ïà¹ØÎĵµ£º
±¸·ÝMySQLÊý¾Ý¿âµÄÃüÁî
mysqldump -hhostname -uusername -ppassword databasename > backupfile.sql
±¸·ÝMySQLÊý¾Ý¿âΪ´øɾ³ý±íµÄ¸ñʽ
±¸·ÝMySQLÊý¾Ý¿âΪ´øɾ³ý±íµÄ¸ñʽ£¬Äܹ»Èøñ¸·Ý¸²¸ÇÒÑÓÐÊý¾Ý¿â¶ø²»ÐèÒªÊÖ¶¯É¾³ýÔÓÐÊý¾Ý¿â¡£
mysqldump -–add-drop-table -uusername -ppassword databasename > bac ......
1.struts.xmlÖÐÉèÖÃ
<constant name="struts.il8n.encoding" value="UTF-8"></constant>
2.jspÒ³ÃæÉèÖÃ
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
3.Êý¾Ý¿âÁ¬½Óurl
jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=u ......
1¡¢ÏÂÔØMySQLµÄ°²×°Îļþ
°²×°MySQLÐèÒªÏÂÃæÁ½¸öÎļþ£º
MySQL-server-5.0.46.i386.rpm¡¡¡¡¡¡
MySQL-client-5.0.46.i386.rpm
2¡¢°²×°MySQL
rpmÎļþÊÇRed Hat¹«Ë¾¿ª·¢µÄÈí¼þ°²×°°ü£¬rpm¿ÉÈÃLinuxÔÚ°²×°Èí¼þ°üʱÃâ³ýÐí¶à¸´ÔÓµÄÊÖÐø¡£¸ÃÃüÁîÔÚ°²×°Ê±³£ÓõIJÎÊýÊÇ
ivh
,ÆäÖÐi±íʾ½«°²×°Ö¸¶¨µÄrmpÈí¼þ°ü£¬V±í ......
1.µÇ¼MySQLÖÕ¶Ë 2.ÊÚȨ:
ÔÊÐíËùÓлúÆ÷·ÃÎÊMySQL·þÎñÆ÷
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH RIVILEGES;
ÔÊÐíÖ¸¶¨»úÆ÷·ÃÎÊMySQL·þÎñÆ÷
GRANT ALL PRIVILEGES ON *.* TO 'root'@'IPµØÖ·'IDENTIFIED BY 'password' WITH GRANT OPTION; ......
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£¬Á½¸ ......