Platinum Partner

Making MySQL Executable Scripts.

Use "here document" statements to build complex script files with embedded SQL statements via the mysql utility.


#! /usr/bin/env bash

# execute some bash scripting commands here

mysql mydatabase <

Note that being in a bash script means that you can expand $-variables inside the SQL code directly.  This is, however, not advised unless you can be sure that only trusted, competent people will run your code.  Otherwise you'll be facing SQL injection attacks.
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}