´«ÖDz¥¿ÍjavaÅàѵ java»ù´¡Ö®MYSQL
Ã÷ÌìÓÐÒ»¸öеľÍÒµ°à¿ª¿ÎÁË£¬ÓеÄͬѧ¾ö¶¨×ª°à£¬×Ô¼ºÐÄÀïҲͦì¶ÜµÄ£¬ÓÌÔ¥²»¾ö£¡
È¥¿ÉÒÔÈÃ×Ô¼º¶Ô»ù´¡¸ü¼ÓÊìÁ·£¬±Ï¾¹ËùÓеÄ֪ʶ¶¼ÊÇж«Î÷£¬Èç¹ûÓиü¶àµÄʱ¼äÁ·Ï°£¬Ð§¹ûÒ»
¶¨¸üºÃ£¡²»È¥ÊǾõµÃÔÀí¶¼¶®µÃÁË£¬Ö»Òª¼á³ÖÉÏÍêʣϵĿγ̣¬¿ÉÒÔÔÙÈ¥ÂýÂýÁ·Ï°´úÂ룬ûÓÐ
±ØÒªÀË·Ñʱ¼ä£¿ºÃì¶Ü£¬Ã÷ÌìÕÒÕÅÀÏʦ×ÉѯÏÂ....
½ñÌì½²ÁËMYSQL£¬ÒÔÏÂΪ×ܽá
Êý¾Ý¿â·þÎñÆ÷£¨¸÷¸öÊý¾ÝÉú²ú³§ÉÌ£¬Òª×ñÑsql±ê×¼
ͬʱÓÖ¿ª·¢³ö×Ô¼ºÊý¾Ý¿âÌØÓеÄÌØÐÔ£©
SQLÊÇÃÀ¹úANSIÖƶ¨µÄ±ê×¼
----Êý¾Ý¿â----±í
----ÏîÄ¿ ----Ò»¸öʵÀý¶ÔÏó
SQLÖÐÓï¾ä¹æÔò£º
1ÔÚmysqlÖУ¬´óСд²»Ãô¸Ð
2sqlÓï¾äÖУ¬¹Ø¼ü×Ö²»ÄÜ¿ç¶àÐлòËõд
3ΪÁËÌá¸ß¿É¶ÁÐÔ£¬Ò»°ã¹Ø¼ü×Ö´óд£¬ÆäËûСд
4¿Õ¸ñºÍËõ½øʹ³ÌÐòÒ׶Á
±íµÄ¸ÅÄ
Ðлò¼Ç¼
Áлò×ֶλòÓò£ºÒ»ÁоßÓÐÏàͬµÄÀàÐÍ
create table ±íÃû{
×Ö¶Î1 Êý¾ÝÀàÐÍ£¬
×Ö¶Î2 Êý¾ÝÀàÐÍ£¬
×Ö¶Î3 Êý¾ÝÀàÐÍ
#×îºóÒ»¸ö×ֶκóÃæûÓГ£¬”ºÅ
}
ÁÐÈ磺
CREATE TABLE emp{
id INT£¬
NAME VARCHAR(11),
sex CHAR£¨5£©
}
CHAR ¶¨³¤×Ö·û
VARCHAR ±ä³¤×Ö·û
Á½ÕßµÄÇø±ðÊÇ£ºVARCHARÈç¹ûÓжàÓàµÄ¿Õ¼ä£¬Æä»áÊͷŵô
¶øCHAR¼´Ê¹ÓжàÓàµÄ¿Õ¼ä£¬Ò²ÊÇ×Ô¼ºÕ¼ÓУ¬²»ÊÍ·Å
DOUBLE£¨6£¬2£©9999.99
#¿ÉÒÔ¿´³öÀ´ 6´ú±íÕûÊý+СÊýµÄλÊý
#´ú±íСÊ÷µÄλÊý
ɾ³ý±ídeÓï·¨£º
DROP TABLE emp
1mysql ·þÎñÆ÷¶ËµÄÅäÖÃ
Öص㣺
ÃÜÂëµÄÉ趨£ºÔʼÉèÖÃΪ£ºÓû§Ãû£ºroot ÃÜÂëΪ£º¿Õ£¡
×Ö·û¼¯µÄÑ¡Ôñ£ºÈôÑ¡Ôñgb2312Ò»¶¨²»»á³öÏîÂÒÂ룬ʵ¼ùµÃÖª£¡
2ÅжÏÊÇ·ñ°²×°³É¹¦;
ÔÚdosÃüÁîÐУº
C:\Documents and Settings\Administrator>mysql -u root -p
Enter password: ***
mysql> show databases;
3É趨Êý¾Ý¿â£º
Áгö¿ÉÓõÄ×Ö·û¼¯£º
mysql> SHOW CHARACTER SET;
Ö¸¶¨Ð£¶Ô¹æÔò
&n
Ïà¹ØÎĵµ£º
Java codeFormat ft=Format.getRawFormat();
ft.setEncoding("utf-8");
ft.setIndent(" ");//ÉèÖÃËõ½ø
XMLOutputter outputter=new XMLOutputter(ft);//ÉèÖÃXML¸ñʽ
Õâλ˵µÄ²»´í£»
ÔÚieÀïÃ棬ËüÄÜ°Ñxml×Ô¶¯½âÎö³ÆÊ÷Ðνṹ£¬ËùÒÔ¿´ÆðÀ´Ã»ÎÊÌ⣬ÔÚ¼Çʱ¾ÀïÃ棬¾Í²»ÐÐÁ ......
JAVAÖÐλÔËËã·û°üÀ¨: & | ~ ^ << >> >>>
Ò»¡¢Ê×ÏÈÒª¸ãÇå³þ²ÎÓëÔËËãµÄÊýµÄλÊý£º
javaµÄ8ÖÖ»ù±¾ÀàÐÍ£ºbyte,short, char, int, long,float,double,boolean.
ÔÚÄÚ´æÖй̶¨³¤¶È(×Ö½Ú)£º1&nbs ......
ͨ¹ý Groovy ½øÐÐÑ»·
ͬ´ó¶àÊý½Å±¾ÓïÑÔÒ»Ñù£¬Groovy ¾³£±»Ðû´«ÎªÉú²úÁ¦¸ü¸ß µÄ Java ÓïÑÔÌæ´úÆ·¡£ÄúÒѾ¿´µ½ÁË Groovy ȱÉÙÀàÐÍÄܹ»ÈçºÎ¼õÉÙ´ò×Ö¹¤×÷¡£ÔÚÕâÒ»½Ú£¬½«´´½¨²¢ÊÔÓÃÒ»¸ö repeat º¯Êý¡£ÔÚÕâ¸ö¹ý³ÌÖУ¬½«½øÒ»²½Ì½Ë÷ Groovy Ìá¸ßЧÂʵķ½Ê½¡£
¸üºÃ¡¢¸ü¶ÌµÄÑ»·
ÏÂÃæÕâÖÖ·½·¨¿ÉÒÔ¸üºÃµØ¸ÐÊÜ Groovy ȱ·¦ÀàÐ͵ĺà ......
1¡¢²âÊÔ·½·¨ÈçÏ£º
public static String toUtf8(String str) {
return new String(str.getBytes("UTF-8"),"UTF-8"):
&nb ......