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

MySqlµÄ¼òµ¥Ð޸ıí×Ö¶ÎSQLÓï¾ä

#ÐÂÔöÒ»¸ö×ֶΣ¬Ä¬ÈÏֵΪ0£¬·Ç¿Õ£¬×Ô¶¯Ôö³¤£¬Ö÷¼ü
   alter table tabelname add new_field_name field_type default 0 not null auto_increment ,add primary key (new_field_name);
#Ôö¼ÓÒ»¸öÐÂ×Ö¶Î
   alter table tableName add new_field_name field_type;
   alter table tableName add new_field_name field_type not null default '0';
#ɾ³ý×Ö¶Î
   alter table tableName drop column field_name;
#ÖØÃüÃû×Ö¶Î
   alter table tableName change old_field_name new_field_name new_field_type;
#¸Ä±ä×ֶεÄÀàÐÍ
   alter table tableName change field_name field_name field_type;
#ÖØÃüÃû±í
   alter table table_old_name rename table_new_name;
#¼ÓË÷Òý
  alter table tablename add index Ë÷ÒýÃû (×Ö¶ÎÃû1[£¬×Ö¶ÎÃû2 …]);
  alter table tablename add index index_name(name);
#ÉèÖÃÖ÷¼ü
  alter table tablename add primary key(field_name);
#Ìí¼ÓΨһË÷Òý
  alter table tablename add unique index_name(field_name);
#ɾ³ýË÷Òý
  alter table tablename drop index index_name;


Ïà¹ØÎĵµ£º

MysqlÓû§Ìí¼Ó¼°È¨ÏÞ·ÖÅä

     ¸ñʽ£ºgrant [PRIVILEGES]  on [databaseName.tableName] to [userName]@[host] identified by [password] with grant option;
     eg1:  grant select on mysql.user to wqh@localhost
     eg2:GRANT SELECT,INSERT,UPDATE,DELETE,CREATE ......

mysqlÖÐINSTRº¯ÊýµÄÓ÷¨

mysqlÖÐINSTRº¯ÊýµÄÓ÷¨
INSTR(×Ö¶ÎÃû, ×Ö·û´®)
Õâ¸öº¯Êý·µ»Ø×Ö·û´®ÔÚijһ¸ö×ֶεÄÄÚÈÝÖеÄλÖÃ, ûÓÐÕÒµ½×Ö·û´®·µ»Ø0£¬·ñÔò·µ»ØÎ»Ö㨴Ó1¿ªÊ¼£©
SELECT * from tblTopic ORDER BY INSTR( topicTitle, 'ha' ) > 0 DESC
SELECT INSTR( topicTitle, 'ha' ) from tblTopic
mysqlÖÐʹÓÃinstrÅäºÏINÅÅÐò
½«instr½á¹û×÷Î ......

MySQL³£ÓÃÄÚÖú¯Êý

1£º ASCII(str) ¡¡·µ»Ø×Ö·û´®strµÄµÚÒ»¸ö×Ö·ûµÄASCIIÖµ(strÊǿմ®Ê±·µ»Ø0) mysql> select ASCII('2'); ¡¡¡¡-> 50 mysql> select ASCII(2); ¡¡¡¡-> 50 mysql> select ASCII('dete'); ¡¡¡¡-> 100
2£ºORD(str) ¡¡Èç¹û×Ö·û´®str¾äÊ×Êǵ¥×Ö½Ú·µ»ØÓëASCII()º¯Êý·µ»ØµÄÏàֵͬ¡£¡¡Èç¹ûÊÇÒ»¸ö¶à×Ö½Ú×Ö·û,ÒÔ¸ñʽ·µ ......

ZZʹÓÃSQL Server´æ´¢ASP.NET Session±äÁ¿

´´½¨ºÍÅäÖÃASP.NET Session״̬Êý¾Ý¿â
ÔÚ»ùÓÚNLB£¨ÍøÂç¸ºÔØÆ½ºâ£©»·¾³ÏµÄASP.NET WebÓ¦ÓóÌÐò¿ª·¢£¬ÎÒÃÇÐèÒª½«Session´æ´¢ÔÚÊý¾Ý¿âÖй©¶à¸öWebÓ¦ÓóÌÐòµ÷Óã¬ÒÔÏÂΪÅäÖ÷½·¨¼°×¢ÒâÊÂÏî¡£
1.´´½¨ÓÃÓÚ´æ´¢ASP.NET SessionµÄÊý¾Ý¿â£¨Ô¶³Ì¡¢±¾µØ½Ô¿É£¬Ê¹ÓÃÊý¾Ý¿âÓû§Éí·ÝÈÏÖ¤£©
ÔÚWindows\Microsoft.NET\Framework/V2.0.507 ......

sql serverµÄ¸´ÖƺͶ©ÔÄ

      ×î½üÓöµ½Ò»¸öÏîÄ¿£¬¿Í»§ÔÚ×ܲ¿Â¼ÈëÐÅÏ¢ºó£¬Êý¾ÝÐèҪͬ²½µ½ÏÂÊôµÄÈô¸É¸ö×ÓϵͳÖС£ÏÖÔÚ×ܲ¿µ¥¶ÀʹÓÃÒ»¸öÊý¾Ý¿â£¬ÏÂÊôµ¥Î»¸÷×ÔʹÓÃ×Ô¼ºµÄÊý¾Ý¿â¡£
      ¶ÔÓÚÕâ¸öÎÊÌ⣬Ïëµ½Á˼¸¸ö½â¾ö·½°¸£º
     1¡¢×Ô¼ºÐ´´úÂë½â¾ö¡£¶¨ÒåºÃ·ÃÎÊÿ¸öÊý¾ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ