通过phpMyAdmin在MySQL中创建id字段时,必须指定整数长度吗? [英] do I have to specify integer length when creating an id field in MySQL through phpMyAdmin?

查看:272
本文介绍了通过phpMyAdmin在MySQL中创建id字段时,必须指定整数长度吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到有人没有在教程中设置长度,但是它专门用于计算用户总数,只是设置为自动递增.我习惯总是指定长度,因为我认为这是强制性的,但我想问一下是否可以将其保留为空白,除非明确指定始终设置长度的日期或密码. (如果不确定,我曾经将其设置为11位或更多)

I saw someone not set the length in a tutorial but it was specifically for counting the total number of users and just set to auto-increment. I've been of the habit of always specifying a length because I thought it was mandatory, but I wanted to ask if I can leave it blank unless it specifically a date or pin number etc where the length is always set. (I used to set it as 11 digits or more if I wasn't sure)

推荐答案

每个整数字段默认为11时为空,以便将其保留.

Every integer field defaults to 11 when left blank so you can leave it.

这篇关于通过phpMyAdmin在MySQL中创建id字段时,必须指定整数长度吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆