{"blog_title":"\u304c\u308b\u306e\u5065\u5fd8\u9332","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","author_name":"gallu","height":"190","url":"https://gallu.hatenadiary.jp/entry/2021/06/07/233106","blog_url":"https://gallu.hatenadiary.jp/","author_url":"https://blog.hatena.ne.jp/gallu/","version":"1.0","description":"\u3061\u3068\u3046\u3061\u306e\u5b50\u304b\u3089 MySQL\u3067\u30e6\u30cb\u30fc\u30af\u30ad\u30fc\u3068PK\u3042\u308b\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066ON DUPLICATE KEY UPDATE\u5f35\u3063\u3066\u3001unique\u3067\u306e\u91cd\u8907\u3055\u305b\u308b\u3068auto increment\u5024\u98db\u3093\u3058\u3083\u3046\u3093\u3060\u306d\u3002\u3002\u3002 \u3068\u3044\u3046\u8208\u5473\u6df1\u3044\u8a71\u3092\u805e\u3044\u305f\u306e\u3067\u3001\u65e9\u901f\u5b9f\u9a13\u3002 CREATE TABLE test ( id SERIAL, name VARCHAR(256) UNIQUE, PRIMARY KEY(id) ); mysql> insert into test(name) values('n1'); Query OK, 1 row affected (0.02 sec) mysql> select * from \u2026","width":"100%","image_url":null,"categories":["MySQL"],"title":"MySQL\u3067UNIQUE\u306b\u5f15\u3063\u304b\u304b\u3063\u305f\u6642\u306eAUTO INCREMENT\u306e\u6319\u52d5","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgallu.hatenadiary.jp%2Fentry%2F2021%2F06%2F07%2F233106\" title=\"MySQL\u3067UNIQUE\u306b\u5f15\u3063\u304b\u304b\u3063\u305f\u6642\u306eAUTO INCREMENT\u306e\u6319\u52d5 - \u304c\u308b\u306e\u5065\u5fd8\u9332\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2021-06-07 23:31:06"}