ホーム > 未分類 > [MySQL] int(11)の11は最大桁数ではない

[MySQL] int(11)の11は最大桁数ではない

危なかった。勘違いしてた。
int(11)の「11」って表示桁数を揃えるためのものであって、格納できるのはあくまで4バイトなんですね。
参照: 本家ドキュメント

試してみる。

mysql> create table int_test (id int(11) primary key);
Query OK, 0 rows affected (0.04 sec)
 
mysql> desc int_test;
+-------+---------+------+-----+---------+-------+
| Field | Type    | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| id    | int(11) | NO   | PRI | NULL    |       | 
+-------+---------+------+-----+---------+-------+
1 row in set (0.00 sec)
 
mysql> insert into int_test values(2147483647);
Query OK, 1 row affected (0.00 sec)
 
mysql> insert into int_test values(2147483648);
ERROR 1062 (23000): Duplicate entry '2147483647' for key 1
カテゴリー: 未分類 タグ:
  1. 2020 年 2 月 19 日 23:57 | #1

    A motivating discussion is worth comment. I think that you ought to publish more about this subject matter, it may not be a taboo subject but generally people do not talk about these topics. To the next! Kind regards!!| а

  2. 2020 年 2 月 20 日 07:57 | #2

    What’s up to every one, it’s genuinely a pleasant for me to visit this web site, it contains important Information.| а

  3. 2020 年 2 月 20 日 15:54 | #3

    At this time it sounds like BlogEngine is the preferred blogging platform out there right now. (from what I’ve read) Is that what you’re using on your blog?| а

  4. 2020 年 2 月 21 日 00:00 | #4

    What’s up, this weekend is pleasant for me, as this occasion i am reading this enormous educational paragraph here at my home.| а

  5. 2020 年 2 月 21 日 08:11 | #5

    You should take part in a contest for one of the highest quality blogs on the web. I will highly recommend this web site!| а

  6. 2020 年 2 月 21 日 16:11 | #6

    My partner and I stumbled over here from a different web page and thought I should check things out. I like what I see so i am just following you. Look forward to looking over your web page repeatedly.| а

  7. 2020 年 2 月 22 日 00:10 | #7

    I have been surfing online more than 3 hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. In my view, if all web owners and bloggers made good content as you did, the internet will be a lot more useful than ever before.| а

  8. 2020 年 2 月 22 日 08:11 | #8

    Excellent blog! Do you have any tips and hints for aspiring writers? I’m planning to start my own site soon but I’m a little lost on everything. Would you advise starting with a free platform like WordPress or go for a paid option? There are so many options out there that I’m completely overwhelmed .. Any suggestions? Appreciate it!| а

  9. 2020 年 2 月 22 日 16:06 | #9

    Hi my friend! I want to say that this article is amazing, nice written and come with almost all important infos. I’d like to see extra posts like this .| а

  10. 2020 年 2 月 23 日 00:59 | #10

    I think this is among the such a lot vital information for me. And i am satisfied reading your article. But should observation on few basic issues, The web site taste is ideal, the articles is truly excellent : D. Good task, cheers| а

  11. 2020 年 2 月 23 日 13:22 | #11

    Everyone loves what you guys are usually up too. Such clever work and reporting! Keep up the amazing works guys I’ve incorporated you guys to our blogroll.| а

  12. 2020 年 2 月 24 日 01:42 | #12

    hey there and thank you for your information – I have certainly picked up something new from right here. I did however expertise some technical points using this website, as I experienced to reload the web site a lot of times previous to I could get it to load properly. I had been wondering if your web host is OK? Not that I’m complaining, but sluggish loading instances times will very frequently affect your placement in google and could damage your quality score if ads and marketing with Adwords. Anyway I am adding this RSS to my email and can look out for a lot more of your respective fascinating content. Make sure you update this again soon.| а

  13. 2020 年 2 月 24 日 14:20 | #13

    Really no matter if someone doesn’t be aware of afterward its up to other people that they will assist, so here it takes place.| а

  14. 2020 年 2 月 25 日 04:48 | #14

    I’m extremely impressed with your writing skills and also with the layout on your weblog. Is this a paid theme or did you customize it yourself? Either way keep up the nice quality writing, it is rare to see a great blog like this one these days.| а

  15. 2020 年 2 月 25 日 17:39 | #15

    Wow, wonderful blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your website is excellent, as well as the content!| а

  16. providence ministries rehab dalton ga
    2020 年 2 月 26 日 00:03 | #16

    christian rehab centers in pa drug rehab centers western australia effects of using meth year long rehab centers drug rehab logo

  17. 2020 年 2 月 26 日 06:43 | #17

    Hi, Neat post. There’s a problem together with your website in internet explorer, would test this? IE still is the marketplace chief and a huge component to folks will pass over your excellent writing due to this problem.| а

  18. 2020 年 2 月 26 日 19:40 | #18

    I got this site from my buddy who told me on the topic of this website and now this time I am browsing this web page and reading very informative content here.| а

  19. 2020 年 2 月 27 日 08:50 | #19

    You really make it seem so easy with your presentation but I find this topic to be actually something that I think I would never understand. It seems too complicated and extremely broad for me. I am looking forward for your next post, I’ll try to get the hang of it!| а

  20. 2020 年 2 月 27 日 19:56 | #20

    What’s Taking place i’m new to this, I stumbled upon this I have found It absolutely useful and it has aided me out loads. I’m hoping to contribute & assist other customers like its helped me. Good job.| а

  21. 2020 年 2 月 28 日 08:53 | #21

    Great blog here! Also your site loads up fast! What host are you using? Can I get your affiliate link to your host? I wish my web site loaded up as quickly as yours lol| а

コメントページ
1 2 3 225
  1. 2010 年 3 月 4 日 00:42 | #1