⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mysql

📁 有关mysql文章教程,本人收集的一些有关mysql文章教程
💻
📖 第 1 页 / 共 2 页
字号:
</td> 
<td class=TableBody_Right><td></tr>
</table>

<table cellpadding="0" cellspacing="0" class=TableBorder1>
<tr><td class=TableBody_Left></td> 
<td width="750"  bgcolor="#0080FF">&nbsp;&nbsp;<a href=http://www.9liu.com/channel/HTMLfile/WebArticle/articlefile/Asp/Sort_2_25.htm class=type target=_top><font color="#ffffff">ASP技术</font></a>&nbsp;&nbsp;<a href=http://www.9liu.com/channel/HTMLfile/WebArticle/articlefile/DianNet/Sort_2_29.htm class=type target=_top><font color="#ffffff">.Net专区</font></a>&nbsp;&nbsp;<a href=http://www.9liu.com/channel/HTMLfile/WebArticle/articlefile/JSP/Sort_2_27.htm class=type target=_top><font color="#ffffff">JSP技术</font></a>&nbsp;&nbsp;<a href=http://www.9liu.com/channel/HTMLfile/WebArticle/articlefile/PHP/Sort_2_26.htm class=type target=_top><font color="#ffffff">PHP技术</font></a>&nbsp;&nbsp;<a href=http://www.9liu.com/channel/HTMLfile/WebArticle/articlefile/DataDB/Sort_2_28.htm class=type target=_top><font color="#ffffff">数据库</font></a>&nbsp;&nbsp;</td> 
<td class=TableBody_Right><td></tr>
</table>

<table cellpadding="0" cellspacing="0" class=TableBorder1>
<tr><td class=TableBody_Left></td> 
<td width="750" align=center><!--广告位--><iframe border=0 vspace=0 hspace=0 bgcolor=#888888 Name=union163com align=center marginwidth=0 marginheight=0 framespacing=0 frameborder=0 scrolling=no width=750 height=125 src="http://news2.163.com/ent/tpl2.jsp#ID=3123&NO=13635&newswidth=750&newstNO=10&newsiNO=2&barbgcolor=FFBA02&txtcolor=CF9043&newsbg=ffffff&newsbar=0&vcolor=999999&decor=underline&imgsize=85"></iframe></td> 
<td class=TableBody_Right><td></tr>
</table>
<!----------------------------------------上边框-----------//--->
<table cellpadding="0" cellspacing="0" class=TableBorder1>
<tr><td class=TableBody_Left></td> 
<td align=center valign=top width=180>
<p>
<p>最新添加 (news)   
<p></p>
<p>推荐信息(hot)</p>
<p> </p> 
<p>最热信息 (click)</p> 

     
<script language="JavaScript">
eLong_Affiliate_MemberID = 4003751;
style = 0;
</script>
<script language="JavaScript" src="http://icons.elong.com/affiliate/scripts/1/eng_travel_120x600.js"></script>     
</td>
<td align=center width="570">

<!--//---------------------------------------------Tempinfo------->
<table cellpadding="0" cellspacing="0" border="0" width="97%">
<tr><td>
<p align=center><b>MySQL中的SQL-- TEXT、DATE、和SET数据类型</b></p>
<div align=center>加入时间:2003-12-30 15:28:05   来源:   作者:' 点击数:<Script language=JavaScript src="http://www.9liu.com/channel/js/tongji.asp?id1=2&id2=13&id3=165 "></script></div>        
<div align=center>-----------------------------------------------------------------</div>
<div align=center>
<script language="JavaScript">
eLong_Affiliate_MemberID = 4003751;
</script>
<script language="JavaScript" src="http://icons.elong.com/affiliate/scripts/6/love_custom_4.js"></script></div>
<div>MySQL<I></I>&nbsp;数据表的字段必须有定义一个数据类型。这有大约<I></I>&nbsp;25<I></I>&nbsp;种选择,大部分都是直接明了的,就不多费口舌了。但有几个有必要提一下。<I></I>&nbsp;<P></P>TEXT<I></I>&nbsp;不是一种数据类型,虽然可能有些书上是这么说的。它实际上应该是“<I></I>&nbsp;LONG<I></I>&nbsp;VARCHAR<I></I>&nbsp;”或者“<I></I>&nbsp;MEDIUMTEXT<I></I>&nbsp;”。<I></I>&nbsp;<P></P>DATE<I></I>&nbsp;数据类型的格式是<I></I>&nbsp;YYYY-MM-DD<I></I>&nbsp;,比如:<I></I>&nbsp;1999-12-08<I></I>&nbsp;。你可以很容易的用<I></I>&nbsp;date<I></I>&nbsp;函数来得到这种格式的当前系统时间:<I></I>&nbsp;<P></P>date(&quot;Y-m-d&quot;)<I></I>&nbsp;<P></P>  并且,在<I></I>&nbsp;DATA<I></I>&nbsp;数据类型之间可以作减法,得到相差的时间天数:<I></I>&nbsp;<P></P>$age<I></I>&nbsp;=<I></I>&nbsp;($current_date<I></I>&nbsp;-<I></I>&nbsp;$birthdate);<I></I>&nbsp;<P></P>  集合<I></I>&nbsp;SET<I></I>&nbsp;是一个有用的数据类型,它和枚举<I></I>&nbsp;ENUM<I></I>&nbsp;有点相似,只不过是<I></I>&nbsp;SET<I></I>&nbsp;能够保存多个值而<I></I>&nbsp;ENUM<I></I>&nbsp;只能保存一个值而已。而且,<I></I>&nbsp;SET<I></I>&nbsp;类型最多只能够有<I></I>&nbsp;64<I></I>&nbsp;个预定的值,而<I></I>&nbsp;ENUM<I></I>&nbsp;类型却能够处理最多<I></I>&nbsp;65,535<I></I>&nbsp;个预定义的值。而如果需要有大于<I></I>&nbsp;64<I></I>&nbsp;个值的集合,该怎么办呢?这时就需要定义多个集合来一起解决这个问题了。<I></I>&nbsp;<P></P>通配符<I></I>&nbsp;<P></P>  <I></I>&nbsp;SQL<I></I>&nbsp;的同配符有两种:“<I></I>&nbsp;*<I></I>&nbsp;”和“<I></I>&nbsp;%<I></I>&nbsp;”。分别用在不同的情况下。例如:如果你想看到数据库的所有内容,可以像这样来查询:<I></I>&nbsp;<P></P>SELECT<I></I>&nbsp;*<I></I>&nbsp;FROM<I></I>&nbsp;dbname<I></I>&nbsp;<P></P>WHERE<I></I>&nbsp;USER_ID<I></I>&nbsp;LIKE<I></I>&nbsp;&#39;%&#39;;<I></I>&nbsp;<P></P>  这儿,两个通配符都被用上了。他们表示相同的意思<I></I>&nbsp;??<I></I>&nbsp;都是用来匹配任何的字符串,但是他们用在不同的上下文中。“<I></I>&nbsp;*<I></I>&nbsp;”用来匹配字段名,而“<I></I>&nbsp;%<I></I>&nbsp;”用来匹配字段值。另外一个不容易引起注意的地方是“<I></I>&nbsp;%<I></I>&nbsp;”通配符需要和<I></I>&nbsp;LIKE<I></I>&nbsp;关键字一起使用。<I></I>&nbsp;<P></P>还有一个通配符,就是下划线“<I></I>&nbsp;_<I></I>&nbsp;”,它代表的意思和上面不同,是用来匹配任何单个的字符的。<I></I>&nbsp;</div>
<div align=center></div>
<div align=right>录入员:未发现</div>
</td></tr>
</table>
<!--------------------------------------------------------------------//-->
<table cellpadding="0" cellspacing="0" border="0" width="97%">
<tr>
<td height="109">其它相关信息</td>
<td height="109">上面的5条
<p>下面的5条</td>
</tr>
<tr>
<td height="109" colspan="2"> 
<p>用户相关讨论</p>
<p>用户发表评论表单</p>
<p> </td>
</tr>
<tr>
<td colspan="2" height="108"> 
<p>
</td></tr>
</table>

</td>
<td class=TableBody_Right><td></tr>
</table>

<table cellpadding="0" cellspacing="0" class=TableBorder1>
<tr><td class=TableBody_Left></td> 
<td width="750" align=center>
<script language=javascript src=http://ulinkjs.tom.com/tom_773_ent.js></script>
</td> 
<td class=TableBody_Right><td></tr>
</table>

<table cellpadding="0" cellspacing="0" class=TableBorder1>
<tr><td class=TableBody_Left></td> 
<td width="750" align=center>
<script language=javascript src=http://imgu.21cn.com/mu/js/2/b.js></script>
</td> 
<td class=TableBody_Right><td></tr>
</table>

<table cellpadding="0" cellspacing="0" class=TableBorder1>
<tr><td class=TableBody_Left></td> 
<td width="750">
<div align=center>
<a href=http://shop.7cv.com/shop/index.php?asstfrom=brandoyu target=_blank>
<img src="http://image.7cv.com/associate/images/20040213/b13.jpg" border=0></a> 
</div>
</td> 
<td class=TableBody_Right><td></tr>
</table>

<!---//-------------------------------------下边框---------->
<table cellpadding="0" cellspacing="0" class=TableBorder1>
<tr><td class=TableBody_Left></td> 
<td width="750">
<script>document.writeln('<script LANGUAGE=\"JavaScript\" src=\"http://www.Bitcn.com.cn/ControlCenter/js/right.asp?class=3\"><\/script>');</script>
</td> 
<td class=TableBody_Right><td></tr>
</table>
<!---------------------------------------下边框---------//--->
</div></div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -