SQLExpr[expr]
allows a Wolfram Language expression to be stored in a database.
Details and Options
Examples
Basic Examples
See Also
Tech Notes
Related Guides
DatabaseLink`
DatabaseLink`
SQLExpr
SQLExpr[expr]
allows a Wolfram Language expression to be stored in a database.
Details and Options
- To use SQLExpr, you first need to load DatabaseLink using Needs["DatabaseLink`"].
Examples
Basic Examples (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];