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

mysqlÈÝÒ×±»ºöÂÔµÄÓ÷¨

1.ÔÚ´´½¨±íµÄͬʱ´´½¨Ë÷Òý
  CREATE TABLE material(id INT NOT NULL, name char(40) NOT NULL, resistance INT, INDEX index1(id,name), UNIQUE INDEX index2(name))
  µÚÒ»¸öË÷Òý£¬ÃûΪindex1£¬ÓÉidºÍnameÁ½¸ö×Ö¶Î×é³É¡£µÚ¶þ¸öË÷ÒýÖ»°üº¬name£¬²¢Ö¸Ã÷name×ֶεÄÖµ±ØÐëÊÇΨһµÄ¡£
2.²åÈëÊý¾Ý£¬¿ÉÒÔͨ¹ýÆäËûij¸ö±íÖеÄÊý¾ÝÌî³äбíÒÔ²åÈëÐÂÊý¾Ý
  INSERT INTO foods(name,fat) SELECT food_name, fat_grams from recipes
3 ¡£SELECT * from people ORDER BY name LIMIT 19,30 ±íʾ´ÓµÚ20Ìõ¼Ç¼¿ªÊ¼È¡³ö30Ìõ¼Ç¼
4.mysqlÌṩÁË»ùÓÚÀ©Õ¹ÕýÔò±í´ïʽµÄÄ£ºýÆ¥Åä
   SELECT TITLE from BOOK WHERE TITLES REGEXP 'Java'; Æ¥ÅätitlesÖаüº¬Java¡£ REGEXP '^java' Æ¥ÅäÒÔ'java'¿ªÍ·µÄtitles£¬ REGEXP ’java$’Æ¥ÅäÒÔjava½áβµÄtitles, ÓëREGEXPÏà¶ÔµÄÊÇNOT REGEXP¡£
5.mysqlÊÂÎñ´¦Àí
   ÒªÔÚÊÂÎñ±íÉÏÖ´ÐÐÊÂÎñ´¦Àí£¬Ê×ÏÈÒªÓÃset AUTOCOMMIT=0¹Ø±Õ×Ô¶¯Ìá½»¹¦ÄÜ£¬È»ºóÖ´ÐÐÒªÔÚÕâ¸öÊÂÎñÖÐÖ´ÐеÄsqlÓï¾ä£¬×îºóÓÃcommitÃüÁîÍê³ÉÊÂÎñ´¦Àí£¬Òª»Ø¹öʹÓÃrollbackÃüÁî¡£Èç¹ûÔÚÊÂÎñÖÐÓöµ½ÏÂÃ漸¸öÃüÁîÒ²»á×Ô¶¯½áÊøµ±Ç°ÊÂÎñ£º
   ALTER TABLE
   BEGIN
   CREATE INDEX
   DROP DATABASE
   DROP TABLE
   LOCK TABLES
   RENAME TABLE
   TRUNCATE
   UNLOCK TABLES


Ïà¹ØÎĵµ£º

MySQL ALTERÓï·¨

 
ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...]
alter_specification:
ADD [COLUMN] create_definition [FIRST | AFTER column_name ]
or ADD INDEX [index_name] (index_col_name,...)
or ADD PRIMARY KEY (index_col_name,...)
or ADD UNIQUE [index_name] (index_col_name,...)
or ALTER [ ......

MySQL¿É¿¿ÐÔ·½°¸·ÖÎöÓë±È½Ï

ÒýÓÃhttp://bbs.yahunet.com/thread-9946-1-1.html
´Ó»ù±¾Çé¿ö¡¢³É±¾¡¢ÓÅȱµãºÍÓ¦Óó¡ºÏµÈ·½Ãæ¶Ô5ÖÖMySQLµÄ¿É¿¿ÐÔ·½°¸
½øÐÐÁË·ÖÎö
ºÍ±È½Ï£¬¶ÔMySQLµÄ¿ª·¢ºÍ¹ÜÀí
ÓÐÒ»¶¨µÄ½è¼ø×÷Óá£
1£®MySQL Clustering(ndb-cluster stogare)
¼ò½é£º
MySQL¹«Ë¾ÒÔ´æ´¢ÒýÇ淽ʽÌṩµÄ¸ß¿É¿¿ÐÔ·½°¸£¬ÊÇÊÂÎñ°²È«µÄ£¬ÊµÊ±¸´ÖÆÊý¾Ý
£¬¿ÉÓ ......

mysql»ù±¾ÃüÁî

 Æô¶¯£ºnet start mySql;
  ½øÈ룺mysql -u root -p/mysql -h localhost -u root -p databaseName;
  ÁгöÊý¾Ý¿â£ºshow databases;
  Ñ¡ÔñÊý¾Ý¿â£ºuse databaseName;
  Áгö±í¸ñ£ºshow tables£»
  ÏÔʾ±í¸ñÁеÄÊôÐÔ£ºshow columns from tableName£»
  ½¨Á¢Êý¾Ý¿â£ºsource fileNam ......

MySQLÄ£ÄâOracleµÄSequenceÁ½ÖÖ·½·¨


<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......

MYSQL£ºCannot convert value '0000

½ñÌì´ÓMYSQLÊý¾Ý¿âץȡʱ£¬·¢ÉúÁËCannot convert value '0000-00-00 00:00:00' from column 10 to TIMESTAMPÒì³£
googleÁËһϣ¬´ó¸ÅÒâ˼ÊÇMySQLÖеÄDatetimeÖµÎÞ·¨ÔÙJAVAÖпɿ¿µÄ±»±íʾ£¬°´ÕÕJDBCºÍSQLµÄ±ê׼ĬÈÏÇé¿öϲúÉúÒì³£¡£
JDBCÔÊÐíÓÃÏÂÁеÄÖµ¶ÔzeroDateTimeBehavior ÊôÐÔÀ´ÉèÖÃÕâЩ´¦Àí·½Ê½£¬
exception (the d ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ