make_update | R Documentation |
Create a QueryUpdate instance.
make_update(tabl, set, where = NULL)
tabl |
A table name. |
set |
A StmtSet instance containing the fields to update. |
where |
A StmtWhere instance to add a where clause (optional). |
An instance of QueryUpdate.
# Generate a simple update query:
where <- StmtWhere$new(ExprBinOp$new(
ExprField$new("year"), "<",
ExprValue$new(2010)
))
set <- make_set(price = 9.50, old = TRUE)
update <- make_update('books', set = set, where = where)$toString()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.