SQLExpr
SQLExpr[expr]
allows a Wolfram Language expression to be stored in a database.
更多信息和选项
范例
基本范例
参见
技术笔记
相关指南
DatabaseLink`
DatabaseLink`
SQLExpr
SQLExpr[expr]
allows a Wolfram Language expression to be stored in a database.
更多信息和选项
- To use SQLExpr, you first need to load DatabaseLink using Needs["DatabaseLink`"].
范例
基本范例 (1)
Needs["DatabaseLink`"]If you find that the examples in this section do not work as shown, you may need to install or restore the example database with the DatabaseLink`DatabaseExamples` package, as described in Using the Example Databases.
conn = OpenSQLConnection["demo"];SQLCreateTable[conn, SQLTable["EXPRTABLE"], {SQLColumn["EXPRCOL", "DataTypeName" -> "VARCHAR", "DataLength" -> 2 ^ 12]}];SQLInsert[conn, "EXPRTABLE", {"EXPRCOL"}, {SQLExpr[Sin[x ^ 2]]}];SQLSelect[conn, "EXPRTABLE"]Use the expression in an evaluation:
Plot[Identity@@%[[1, 1]], {x, -2Pi, 2Pi}]SQLDropTable[conn, "EXPRTABLE"];CloseSQLConnection[conn];