snipt

Ctrl+h for KB shortcuts

MySQL

Enregistre le retour d'une requête dans un fichier (idéal pour les blobs)

SELECT columns FROM table_name WHERE whatever='something' INTO OUTFILE "/tmp/outfile.txt"; 
https://snippets.siftie.com/embed/dc662495aada999ccc873b964c326649/
/raw/dc662495aada999ccc873b964c326649/
dc662495aada999ccc873b964c326649
mysql
MySQL
1
2019-03-18T22:30:37
True
False
False
/api/public/snipt/1484/
enregistre-le-retour-dune-requete-dans-un-fichier-ideal-pour-les-blobs
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">SELECT</span> <span class="n">columns</span> <span class="k">FROM</span> <span class="n">table_name</span> <span class="k">WHERE</span> <span class="n">whatever</span><span class="o">=</span><span class="s1">&#39;something&#39;</span> <span class="k">INTO</span> <span class="k">OUTFILE</span> <span class="s2">&quot;/tmp/outfile.txt&quot;</span><span class="p">;</span> </span></pre></div> </td></tr></table>
blob, data, dump, fichier, file, mysql