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

MYSQL³£ÓÃÃüÁî


Java´úÂë < width="14" height="15" src="/javascripts/syntaxhighlighter/clipboard_new.swf" pluginspage="http://www.macromedia.com/go/getflashplayer">
//¿´µ±Ç°Ê¹ÓõÄÊÇÄĸöÊý¾Ý¿â  
mysql> SELECT DATABASE();  
+------------+ 
| DATABASE() | 
+------------+ 
| menagerie  | 
+------------+ 
Èç¹ûÄ㻹ûѡÔñÈκÎÊý¾Ý¿â£¬½á¹ûÊÇNULL¡£ 
Java´úÂë < width="14" height="15" src="/javascripts/syntaxhighlighter/clipboard_new.swf" pluginspage="http://www.macromedia.com/go/getflashplayer">
//²é¿´ÓÐÄÄЩÊý¾Ý¿â  
mysql> show DATABASE;  
+--------------------+ 
| Database           | 
+--------------------+ 
| information_schema | 
| mysql              | 
| test               | 
+--------------------+ 
Java´úÂë < width="14" height="15" src="/javascripts/syntaxhighlighter/clipboard_new.swf" pluginspage="http://www.macromedia.com/go/getflashplayer">
//Ñ¡ÔñÊý¾Ý¿â  
mysql>use test;  
//;ºÅ¿ÉÓпÉÎÞ,±ØÐëµ¥ÐÐʹÓÃ.  
ΪÁËÕÒ³öµ±Ç°µÄÊý¾Ý¿â°üº¬Ê²Ã´±í(ÀýÈ磬µ±Äã²»ÄÜÈ·¶¨Ò»¸ö±íµÄÃû×Ö)£¬Ê¹ÓÃÕâ¸öÃüÁ 
Java´úÂë < width="14" height="15" src="/javascripts/syntaxhighlighter/clipboard_new.swf" pluginspage="http://www.macromedia.com/go/getflashplayer">
//¿´Êý¾Ý¿âÀïÓÐÄÄЩ±í  
mysql> SHOW TABLES;  
+---------------------+ 
| Tables in menagerie | 
+---------------------+ 
| event               | 
| pet                 | 
+---------------------+ 
Èç¹ûÄãÏëÒªÖªµÀÒ»¸ö±íµÄ½á¹¹£¬¿ÉÒÔʹÓÃDESCRIB


Ïà¹ØÎĵµ£º

MySQL Êý¾Ý¿â³£ÓÃÃüÁî


1¡¢MySQL³£ÓÃÃüÁî
create database name; ´´½¨Êý¾Ý¿â
use databasename; Ñ¡ÔñÊý¾Ý¿â
drop database name Ö±½Óɾ³ýÊý¾Ý¿â£¬²»ÌáÐÑ
show tables; ÏÔʾ±í
describe tablename; ±íµÄÏêϸÃèÊö
select ÖмÓÉÏdistinctÈ¥³ýÖظ´×Ö¶Î
mysqladmin drop databasename ɾ³ýÊý¾Ý¿âÇ°£¬ÓÐÌáʾ¡£
ÏÔʾµ±Ç°mysql°æ±¾ºÍµ±Ç°ÈÕÆÚ
s ......

MySqlÖеÄÄ£ºý²éѯ

ÔÚMySqlÖеÄÄ£ºý²éѯºÍÔÚMSSQLÖеIJ¶à£¬±¾¼Ç¼Ö÷ÒªÊÇ˵ÔÚJDBCÖÐʹÓÃPreparedStatementÀ´¹¹ÔìÒ»¸öÄ£ºý²éѯµÄÓï¾ä¡£
Ä£ºý²éѯSQLÓï¾ä£ºSELECT * from tableA WHERE colA LIKE '%ҪƥÅäµÄÄÚÈÝ%'
¹¹ÔìPreparedStatement£º
String sql = "SELECT * from tableA WHERE colA LIKE [-ÕâÀïÌîʲôÄØ£¿-]";
PreparedS ......

PHP»·¾³ IIS+PHP+MYSQL»·¾³µÄ¼ÜÉè

ºÜ¾ÃûÓÐЩһЩÓÐÓô¦µÄµÄ¶«Î÷ÁË£¡½ñÌì¾Í²»ºúÂÒµÄ䶫Î÷ÁË!дһЩÓÐÓõģ¡µ±È»Ç°ÌáÏÂÊǺܸÐлºÜ¶à¾­³£À´ÎÒ²©¿ÍµÄÅóÓÑһϣ¡¶àл´ó¼Ò£¡£¡£¡£¡£¡
½ñÌìдµÄÊǹØÓÚphp»·¾³¼ÜÉèµÄµÚÒ»ÖÖ·½Ê½£¡µ±È»ÎҾͲ»½ØͼÁË£¡´ó¼ÒÖ»Òª°´ÕÕ²Ù×÷¾Í¿ÉÒÔʵÏֵģ¡
Ò»¡¢°²×° PHP £º±¾ÎÄPHP°²×°Â·¾¶È¡ÎªD:\php\php4\(Ϊ±Ü»ìÏý£¬PHP5.1.x°æ±¾°²×°Â·¾ ......

MySQL schemaÃüÃû¹æÔò

/*****************by
garcon1986************************************************************/
ͨÓùæÔò£º
Õû
¸öÊý¾Ý¿âÀïµÄÃû×Ö¶¼¾¡Á¿Ê¹ÓÃСд¡£ÕâÑùÄÜÏû³ýÓÉÓÚ´óСд£¨
case-sensitivity
£©´øÀ´
µÄ´íÎó¡£
Mysql
ĬÈÏÇø·Ö´óСд¡£
ʹ
ÓÃÏ»®Ï߶ϿªÃû×Ö£¬Ãû×ÖÖв»ÄÜ
ʹÓÿոñ¡£
Ãû×ÖÖо¡Á¿²»Òª
ʹ
ÓÃÊý ......

MySQLÖ¸Áî

Ò»¡¢Á¬½ÓMYSQL¡£
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £­pÓû§ÃÜÂë
1¡¢Á¬½Óµ½±¾»úÉϵÄMYSQL¡£Ê×ÏÈ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼mysql\bin£¬ÔÙ¼üÈëÃüÁîmysql -u root -p£¬»Ø³µºóÌáʾÄãÊäÃÜÂë.×¢ÒâÓû§ÃûÇ°¿ÉÒÔÓпոñÒ²¿ÉÒÔûÓпոñ£¬µ«ÊÇÃÜÂëÇ°±ØÐëûÓпոñ£¬·ñÔòÈÃÄãÖØÐÂÊäÈëÃÜÂë. Èç¹û¸Õ°²×°ºÃMYSQL£¬³¬¼¶Óû§rootÊÇûÓÐÃÜÂëµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ