<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>aipacommander</author_name>
  <author_url>https://blog.hatena.ne.jp/aipacommander/</author_url>
  <blog_title>ITの隊長のブログ</blog_title>
  <blog_url>https://www.aipacommander.com/</blog_url>
  <categories>
    <anon>MySQL</anon>
    <anon>SQL</anon>
  </categories>
  <description>商品のテーブルがあり、その中で登録しているカラム「商品の高さ」を&quot;0cm〜30cmまで&quot;みたいな検索を実装したかった。 普通に考えたらこんな感じ。 mysql&gt; select * from items where height between '0' and '30'; しかし、その昔の仕様の際は「cm」と単位が入っていて、カラムの型がvarcharでした。なので、検索ができない事態に陥る。 さて、困った。 でも調べたらすぐわかりました。 castしてあげればおｋ mysql&gt; select * from items where cast(height as unsigned) between…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.aipacommander.com%2Fentry%2F2016%2F06%2F04%2F122214&quot; title=&quot;【MySQL】varchar型のカラムをinteger側で検索したいとき - ITの隊長のブログ&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>http://cdn.mogile.archive.st-hatena.com/v1/image/aipacommander/297789129598967254.gif</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-06-04 12:22:14</published>
  <title>【MySQL】varchar型のカラムをinteger側で検索したいとき</title>
  <type>rich</type>
  <url>https://www.aipacommander.com/entry/2016/06/04/122214</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
