title: Implement SQL recursive query in both MySQL an SQL Server?
body: <p>I have this native query:</p>
  <pre><code> //return all children
  @Query(
          value = &quot;WITH cte(uuid) AS&quot; +
                  &quot;   (&quot; +
                  &quot;       SELECT uuid&quot; +
                  &quot;       FROM org_unit &quot; +
                  &quot;       WHERE uuid = :uuid&quot; +
                  &quot;           UNION ALL&quot; +
                  &quot;       SELECT ou.uuid&quot; +
                  &quot;       FROM org_unit ou&quot; +
                  &quot;       JOIN cte ON ou.parent_org_unit_uuid = cte.uuid&quot; +
                  &quot;   )&quot; +
                  &quot;  SELECT * FROM org_unit WHERE org_unit.uuid IN   &quot; +
                  &quot;     ( SELECT DISTINCT cte.uuid FROM cte)&quot;,
          nativeQuery = true)
  Collection&lt;OrgUnitEntity&gt; getAllChildrenWithSelf(@Param(&quot;uuid&quot;) String uuid);
  </code></pre>
  <p>but the problem is that this query does not work with MySQL. I want to support SQL Server and MySQL.</p>