链命令在Sqlite: .print点命令不工作

  • 本文关键字:命令 工作 print Sqlite sqlite
  • 更新时间 :
  • 英文 :


我可以在sqlite中链接命令,如:

$ sqlite3 test.sqlite .tables .schema "select * from object_store"

然而,当我尝试使用.print点命令时,它给出了错误。

$ sqlite3 test.sqlite .print "The Tables Are:" .tables
Error: near "The": syntax error

如何打印字符串时链接命令在sqlite?

找到解决方案。必须将。命令及其参数用"括起来。

sqlite3 -cmd ".print The Tables Are:n" -cmd ".tables" test.sqlite .quit

sqlite3 test.sqlite ".print The Tables Are:n" ".tables"

最新更新