
#! /usr/bin/env bash# execute some bash scripting commands heresqlite3 mydatabase <<sql_ENTRY_TAG_1SELECT * FROM mytable WHERE somecondition='somevalue';sql_ENTRY_TAG_1# execute other bash scripting commands heresql_ENTRY_TAG_2SELECT * FROM myothertable WHERE someothercondition='someothervalue';sql_ENTRY_TAG_2
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. 总结
以上是内存溢出为你收集整理的Making SQLITE/SQLITE3 executable scripts全部内容,希望文章能够帮你解决Making SQLITE/SQLITE3 executable scripts所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)