易截截图软件、单文件、免安装、纯绿色、仅160KB

关于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
可不是表示存贮大小的,他表示的当数据的宽度,要是数据的宽度小于
m
,就用空格左补充。
mysql

int
型是长整形,也就是
0~232
,也就是
4
个字节啦。


相关文档:

mysql出错代码中文说明

  mysql出错了,以前往往靠猜.有了这张表,一查就出来了.方便不少.特共享于众
1005:创建表失败
1006:创建数据库失败
1007:数据库已存在,创建数据库失败
1008:数据库不存在,删除数据库失败
1009:不能删除数据库文件导致删除数据库失败
1010:不能删除数据目录导致删除数据库失败
1011:删除数据库文件失 ......

mysql 数据库大小

information_schema库中包含了对整个数据库的很多统计信息,可以通过查看它们,来得到数据库相关的信息。
mysql> use information_schema;
Database changed
mysql> select count(1) as tables, concat(round(sum(table_rows)/1000000,2),'M') as rows, concat(round(sum(data_length)/(1024*1024*1024),2),'G') a ......

Navicat 8 for MySQL 中文乱码

解决方法:
1、关闭数据库连接;
2、右击数据库选择“连接属性”;
3、选择“高级”属性页,将“使用MySQL字符集”的勾去掉,并选择“编码”为“936   (ANSI/OEM - Simplified Chinese GBK)”
4、关闭保存,重新连接。 ......

更改mysql数据库编码为GBK

刚刚安装完mysql后
从cmd中进入mysql数据库
命令行中输入:
mysql -uroot -p123
进入mysql数据库中
命令行中输入:
status;
查看当前数据库中的编码
如下:
--------------
mysql  Ver 14.12 Distrib 5.1.7-beta, for Win32 (ia32)
Connection id:       &nb ......

MYSQL 获取当前日期及日期格式

MYSQL 获取当前日期及日期格式
   获取系统日期:  NOW()
   格式化日期:    DATE_FORMAT(date, format)
               注:   date:时间字段
       ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号