转载请注明出处!
1. 编写sql脚本upgradeDB.sql,其中就是普通sql语句
update tablename set colname=value where ID=value;2. 编写shell脚本
#!/bin/sh
sqlite3 -init upgradeDB.sql crane.db << EOF
.quit
EOF
本文介绍了一种通过编写SQL脚本upgradeDB.sql来更新数据库的方法,并提供了一个使用shell脚本执行该SQL脚本的具体示例。
转载请注明出处!
1. 编写sql脚本upgradeDB.sql,其中就是普通sql语句
update tablename set colname=value where ID=value;#!/bin/sh
sqlite3 -init upgradeDB.sql crane.db << EOF
.quit
EOF

被折叠的 条评论
为什么被折叠?