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

mysqlÖеÄÕýÔò±í´ïʽËÑË÷

Óï·¨£º
select * from table_name where column_name regexp 'ÕýÔò±í´ïʽ'
»òÇø·Ö´óСд
select * from table_name where column_name regexp binary 'ÕýÔò±í´ïʽ'
Ö§³ÖµÄÕýÔò±í´ïʽ·ûºÅ£º
.    ÈÎÒâ×Ö·û
|    »ò£¬È磺a|b|c
[]   ·¶Î§£¬±ÈÈ磺[a-z],[0-9],[^0-9]²»°üÀ¨0-9×Ö·û
^   ÔÚ[]ÖбíʾÅųý£¬·ñÔò±íʾƥÅ俪ͷ
\\   תÒ壬È磺\\\±íʾƥÅä\£¬\\.±íʾƥÅä.
*   0¸ö»ò¶à¸ö
+   1¸ö»ò¶à¸ö
?   0¸ö»ò1¸ö
{n}  n¸ö
{n,}  ²»ÉÙÓÚn¸ö
{n,m} nµ½m¸ö
$  Æ¥Åä½áβ
=====================
[:alnum:]  ÈÎÒâ×ÖĸºÍÊý×Ö£¬Ï൱ÓÚ[a-zA-Z0-9]
[:alpha:]   ÈÎÒâ×Ö·û[a-zA-Z]
[:blank:]   ¿Õ¸ñºÍÖƱí[\\t]
[:cntrl:]     ascii¿ØÖÆ×Ö·û
[:digit:]     Êý×Ö[0-9]
[:graph:][:print:]   ¿É´òÓ¡×Ö·û
[:lower:]   Сд×Öĸ
[:upper:]   ´óд×Öĸ
[:xdigit:]   Ê®Áù½øÖÆÊý[a-fA-F0-9]
ÀýÈ磺[[:digit:]]{4}£¬Æ¥ÅäÈÎÒâ4λÊý×Ö


Ïà¹ØÎĵµ£º

MySqlµÄ±íÀàÐÍ

create database sample;
create table 't_user' (
    'id' int(11) not null auto_increment,
    'name' varchar(100) not null default '',
    primary key ('id')
) type=myisam;
Ñ¡ÏîÖ»ÔÚMySQL 3.23ºÍÒÔºó°æ±¾Öб»ÊµÏÖ¡£
²»Í¬µÄ±íÀàÐÍÊÇ£º
ISAM Ô­À´µÄ±í´¦ÀíÆ ......

SpringÅäÖÃmysqlÊý¾Ý¿â


<! -- beans ÔªËØÊÇSpringÅäÖÃÎļþµÄ¸ùÔªËØ£¬ËùÓеÄSpring µÄÅäÖÃÎļþ¶¼Ó¦°´ÈçϽṹÊéдһ¡µ
<beans>
<!Ò»ÅäÖÃid ΪdataSource µÄbean£¬¸Ãbean ÊǸöÊý¾ÝԴʵÀýÒ»¡µ
<bean ¹¤d="dataSource" class="org.apache.corrunons.dbcp.BasicDataSource"
destroy-method="close">
<! È·¶¨Êý¾ÝÔ´µÄÇ ......

mySQL¼òµ¥´´½¨Êý¾Ý¿â¡¢±í¡¢¸Ä±äÊý¾Ý¿â·¾¶

´´½¨Êý¾Ý¿â£º
mysql>create database test;
Query OK, 1 row affected (0.02 sec)
´´½¨Êý¾Ý¿â±í£º
mysql>use test;
Database changed
´´½¨Êý¾Ý¿â±í£º
myaql>create table user(SID VARCHAR(11), name VARCHAT(6) );
Query OK, 0 rows affected (0.08 sec)
²åÈë¼Ç¼£º
mysql>insert int use ......

mysql´æ´¢¹ý³ÌÖвÎÊýµÄin,out,inoutÇø±ð


MySQL´æ´¢¹ý³ÌµÄ²ÎÊýÓÃÔÚ´æ´¢¹ý³ÌµÄ¶¨Ò壬¹²ÓÐÈýÖÖ²ÎÊýÀàÐÍ,IN,OUT,INOUT,ÐÎʽÈ磺
CREATE PROCEDURE([[IN |OUT |INOUT ] ²ÎÊýÃû Êý¾ÝÀàÐÎ...])
1¡¢IN ÊäÈë²ÎÊý:±íʾ¸Ã²ÎÊýµÄÖµ±ØÐëÔÚµ÷Óô洢¹ý³Ìʱָ¶¨£¬ÔÚ´æ´¢¹ý³ÌÖÐÐ޸ĸòÎÊýµÄÖµ²»Äܱ»·µ»Ø£¬ÎªÄ¬ÈÏÖµ
2¡¢OUT Êä³ö²ÎÊý:¸ÃÖµ¿ÉÔÚ´æ´¢¹ý³ÌÄÚ²¿±»¸Ä±ä£¬²¢¿É·µ»Ø
3¡¢I ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ