<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hagaeru3sei</author_name>
  <author_url>https://blog.hatena.ne.jp/hagaeru3sei/</author_url>
  <blog_title>もちおのWEBアプリ開発日記</blog_title>
  <blog_url>https://hagaeru3sei.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>PostgreSQLでcheckを使ってカラムに入る値を制限する方法があるけどMySQLで同じような事をやってみるMySQLの標準で CREATE TABLE t1 ( id integer not null primary key, c1 tinyint(1) unsigned not null check(c1 between 1 and 2) )みたいな事が書けるんだけどcheckの箇所が無視されちゃいますエラーにはなりませんこれを実現してみる今回はMySQLのコードいじってコンパイルしなおしてとかはしないまずsql_modeを変更してみる mysql&gt; set @@sql_mode=T…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhagaeru3sei.hatenadiary.org%2Fentry%2F20090114&quot; title=&quot;MySQLで制約を使ってみる - もちおのWEBアプリ開発日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-01-14 00:00:00</published>
  <title>MySQLで制約を使ってみる</title>
  <type>rich</type>
  <url>https://hagaeru3sei.hatenadiary.org/entry/20090114</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
