<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tomotomo1129</author_name>
  <author_url>https://blog.hatena.ne.jp/tomotomo1129/</author_url>
  <blog_title>Web開発における知見共有系ページ</blog_title>
  <blog_url>https://job-info.hateblo.jp/</blog_url>
  <categories>
    <anon>Mybatis</anon>
    <anon>SQL</anon>
  </categories>
  <description>Mybatisで条件分岐を実装する方法 MyBatisでの条件分岐の実装 1. ifを使った条件分岐 2. chooseを使った条件分岐 3. whereを使った条件分岐 まとめ Mybatisで条件分岐を実装する方法 MyBatisでの条件分岐の実装 MyBatisでは、動的SQLを使って条件分岐を実装できます。 以下に、test_userというテーブルとtestUserMapperというマッパークラスを例にして、条件分岐の使い方を紹介します。 1. ifを使った条件分岐 ifを使用して、SQLに条件を追加できます。 例えば、ユーザーが有効な場合のみデータを取得するSQLは以下のように書けま…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjob-info.hateblo.jp%2Fentry%2F2024%2F08%2F09%2F230736&quot; title=&quot;Mybatisで条件分岐を実装する方法 - 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>2024-08-09 23:07:36</published>
  <title>Mybatisで条件分岐を実装する方法</title>
  <type>rich</type>
  <url>https://job-info.hateblo.jp/entry/2024/08/09/230736</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
