• <small id='tSPfN'></small><noframes id='tSPfN'>

  • <legend id='tSPfN'><style id='tSPfN'><dir id='tSPfN'><q id='tSPfN'></q></dir></style></legend>

        <bdo id='tSPfN'></bdo><ul id='tSPfN'></ul>

      <tfoot id='tSPfN'></tfoot>

      1. <i id='tSPfN'><tr id='tSPfN'><dt id='tSPfN'><q id='tSPfN'><span id='tSPfN'><b id='tSPfN'><form id='tSPfN'><ins id='tSPfN'></ins><ul id='tSPfN'></ul><sub id='tSPfN'></sub></form><legend id='tSPfN'></legend><bdo id='tSPfN'><pre id='tSPfN'><center id='tSPfN'></center></pre></bdo></b><th id='tSPfN'></th></span></q></dt></tr></i><div id='tSPfN'><tfoot id='tSPfN'></tfoot><dl id='tSPfN'><fieldset id='tSPfN'></fieldset></dl></div>

        varchar 和 int mysql 数据类型的默认值

        Default values for varchar and int mysql data types(varchar 和 int mysql 数据类型的默认值)
        <legend id='OQTyH'><style id='OQTyH'><dir id='OQTyH'><q id='OQTyH'></q></dir></style></legend>
        <tfoot id='OQTyH'></tfoot>

          • <bdo id='OQTyH'></bdo><ul id='OQTyH'></ul>

            <small id='OQTyH'></small><noframes id='OQTyH'>

              <tbody id='OQTyH'></tbody>

                <i id='OQTyH'><tr id='OQTyH'><dt id='OQTyH'><q id='OQTyH'><span id='OQTyH'><b id='OQTyH'><form id='OQTyH'><ins id='OQTyH'></ins><ul id='OQTyH'></ul><sub id='OQTyH'></sub></form><legend id='OQTyH'></legend><bdo id='OQTyH'><pre id='OQTyH'><center id='OQTyH'></center></pre></bdo></b><th id='OQTyH'></th></span></q></dt></tr></i><div id='OQTyH'><tfoot id='OQTyH'></tfoot><dl id='OQTyH'><fieldset id='OQTyH'></fieldset></dl></div>
                • 本文介绍了varchar 和 int mysql 数据类型的默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  截图显示了数据类型的 3 种典型定义:id(自动增量)、标题和数字.

                  The screenshot show 3 typical definitions of data type: id (autoincrement), a title and a number.

                  1.- noneNULL 之间的区别是什么?
                  2.- 当我想要一个空字符串时,我必须为 varchar 类型选择 as defined: '' 吗?
                  3.- 我是否必须为自动增量 int 类型设置 as defined: 0 默认值?

                  1.- Which are differences between: none and NULL?
                  2.- Do I must choose as defined: '' for varchar types when I want an empty string?
                  3.- Do I must put an as defined: 0 default value for autoincrement int types?

                  推荐答案

                  Default none 表示没有默认值.如果插入时未提供值,则查询将失败并显示无默认值错误".

                  Default none means there is no default value. If a value is not provided on an insert, the query will fail with a "no default value error".

                  NULL 是实际的 NULL 值,这意味着如果插入时未提供任何值,则该列将默认为 NULL(空).对于 varchar,您可以将默认值设置为 '',但 NULL 更好.

                  NULL is the actual NULL value meaning if no value is provided on an insert the column will default to NULL (empty). For varchar you can set default to '', but NULL is better.

                  自动增量 int 类型不应该有默认值(默认值:无),因为它总是有一个值.

                  Autoincrement int types shouldn't have a default value (Default: None) because it will always have a value.

                  这篇关于varchar 和 int mysql 数据类型的默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                  Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                  PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                  How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                  get a # from a url in php(从 php 中的 url 获取 #)
                  PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)

                    • <legend id='81ftl'><style id='81ftl'><dir id='81ftl'><q id='81ftl'></q></dir></style></legend>
                    • <i id='81ftl'><tr id='81ftl'><dt id='81ftl'><q id='81ftl'><span id='81ftl'><b id='81ftl'><form id='81ftl'><ins id='81ftl'></ins><ul id='81ftl'></ul><sub id='81ftl'></sub></form><legend id='81ftl'></legend><bdo id='81ftl'><pre id='81ftl'><center id='81ftl'></center></pre></bdo></b><th id='81ftl'></th></span></q></dt></tr></i><div id='81ftl'><tfoot id='81ftl'></tfoot><dl id='81ftl'><fieldset id='81ftl'></fieldset></dl></div>
                          <tbody id='81ftl'></tbody>
                      1. <tfoot id='81ftl'></tfoot>
                      2. <small id='81ftl'></small><noframes id='81ftl'>

                          <bdo id='81ftl'></bdo><ul id='81ftl'></ul>