I have to agree with your assessment of SQL APIs.  Funny how not a single one seems to have been designed by someone who&#x27;d seen printf &amp; scanf.<p>In their defense, your obvious use case is evidence of a database design problem and shouldn&#x27;t be in the API.  The thing `Name` is in should itself have a name or type or class or group or something, capturing the <i>reason</i> foo, bar, and baz go together.  Then the SQL is<p><pre><code>    SELECT * FROM MyTable WHERE NameType = &#x27;foo_group&#x27;;
</code></pre>
For the ad hoc alternative, you need an easy way to insert your array into a temporary table (again, API deficiency) or supply a <i>table</i> parameter, so you can do<p><pre><code>    INSERT INTO #T values -- [your array here]
    SELECT * FROM MyTable WHERE Name IN (SELECT t from #t);
</code></pre>
or<p><pre><code>    SELECT * FROM MyTable WHERE Name IN ?;  -- vaporware SQL syntax</code></pre>