¹ØÓÚmysqlÖеÄint£¨m£©
<!--
/* 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:"\@ËÎÌå";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
mso-pagination:none;
font-size:10.5pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:ËÎÌå;
mso-font-kerning:1.0pt;}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:42.55pt;
mso-footer-margin:49.6pt;
mso-paper-source:0;
layout-grid:15.6pt;}
div.Section1
{page:Section1;}
-->
¹ØÓÚ
mysql
ÖеÄ
int
£¨
m
£©£º
mysql
¡¡Êý×ÖÀàÐ͵ġ¡
int(3)
»ò
int(1)
ÆäÖÐÀ¨ºÅÊý×Ö±íʾʲô
.
¹Ù·½ÓÐÒ»¶Î»°£º
Another
extension is supported by MySQL for optionally specifying the display width of
integer data types in parentheses following the base keyword for the type (for
example, INT(4)). This optional display width is used to display integer values
having a width less than the width specified for the column by left-padding
them with spaces.
ËùÒÔ˵
m
¿É²»ÊDZíʾ´æÖü´óСµÄ£¬Ëû±íʾµÄµ±Êý¾ÝµÄ¿í¶È£¬ÒªÊÇÊý¾ÝµÄ¿í¶ÈСÓÚ
m
£¬¾ÍÓÿոñ×󲹳䡣
mysql
µÄ
int
ÐÍÊdz¤ÕûÐΣ¬Ò²¾ÍÊÇ
0~232
£¬Ò²¾ÍÊÇ
4
¸ö×Ö½ÚÀ²¡£
Ïà¹ØÎĵµ£º
MySQL ÃüÁîÐÐ
1¡¢mysql·þÎñµÄÆô¶¯ºÍÍ£Ö¹
net stop mysql
net start mysql
2¡¢µÇ½mysql
Óï·¨ÈçÏ£º mysql -uÓû§Ãû -pÓû§ÃÜÂë
¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÄãÊäÈëÃÜÂ룬ÊäÈë12345£¬È»ºó»Ø³µ¼´¿É½øÈëµ½mysqlÖÐÁË£¬mysqlµÄÌáʾ·ûÊÇ£º
mysql>
×¢Ò⣬Èç¹ûÊÇÁ¬½Óµ½ÁíÍâµÄ»úÆ÷ÉÏ£¬ÔòÐèÒª¼ÓÈëÒ»¸ö²ÎÊý-h»úÆ÷I ......
1. mysql Èë¿âÂÒÂëÎÊÌâ
½â¾ö°ì·¨
Ê×ÏÈ °²×°µÄʱºò±ØÐëÑ¡Ôñutf-8×Ö·û¼¯
Èç¹û²»ÊÇ¿ÉÒÔ½øÐÐÔÙ´ÎÅäÖûòÕßÉèÖÃÏà¹Ø±äÁ¿
£¨¿ÉÒÔÓà SHOW VARIABLES LIKE %CHARACTER%; ²é¿´ Óà set CHARACTER_** = UTF8£©
Æä´ÎÁ¬½ÓµÄʱºò Ö¸¶¨×Ö·û¼¯
jdbc:mysql://localhost/guestbooktes ......
×÷Õߣº°½Ê¿Î°
·þÎñÆ÷£ºIBM X346
CPU:Intel Xeon 3.0 *4
Äڴ棺2GB
Ó²ÅÌ£ºRAID5
OS£ºwin2003 SE
Ò»¡¢MySQL 5.5 M2
MySQL ĬÈÏÒýÇæInnoDB£¬ÓÅ»¯Ç°ºó¼¸ºõÎÞ²î±ð
¶þ¡¢SQL SERVER 2000 SE
´ÓÕâû´Î²âÊÔ¿´£¬MysqlÔÚÊÂÎñÐÔÄܱíÏÖ²»ÈçSQL SERVER¡£Í¬Ê±£¬Á½ÕßÔÚĬÈÏÇé¿ö£¬ÅúÁ¿Insert£¬Mysql±íÏ ......
1¡¢select * from tablename <Ìõ¼þÓï¾ä> limit 100,15
´Ó100Ìõ¼Ç¼ºó¿ªÊ¼(²»°üÀ¨µÚ100Ìõ¼Ç¼)È¡³ö15Ìõ¼Ç¼ (ʵ¼ÊÈ¡³öµÄÊÇµÚ 101-115Ìõ¼Ç¼Êý¾Ý)
2¡¢select * from tablename <Ìõ¼þÓï¾ä> limit 15
È¡³ö ǰ15Ìõ¼Ç¼Êý¾Ý,limit 15Ï൱ÓÚ limit 0,15 ......
Ê×ÏÈ£¬½¨InnoDBÀàÐÍµÄ±í£¬²ÅÄÜÖ§³ÖÊÂÎñ
$handler = mysql_connect('localhost', '', '');
mysql_select_db('test');
mysql_query('SET AUTOCOMMIT=0'); // ÉèÖÃΪ²»×Ô¶¯Ìá½»²éѯ
mysql_query('START TRANSACTION'); // ¿ªÊ¼²éѯ£¬ÕâÀïÒ²¿ÉÒÔʹÓÃBEGIN
mysql_query("INSERT INTO users VALUES ('ccc')");
mysql_query( ......