DatabaseLink SQL Operations >

SQLUpdate

SQLUpdate
updates data in a table in an SQL connection.
  • Returns an integer specifying the number of rows affected by the query.
  • The following option can be given:
"Timeout"Nonethe timeout for the query
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 DatabaseExamples` package, as described in .
Create a table and insert some data:
Update all the data:
Insert more data:
Update only data matching a condition:
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 DatabaseExamples` package, as described in Using the Example Databases.
In[2]:=
Click for copyable input
Create a table and insert some data:
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
In[5]:=
Click for copyable input
Out[5]=
Update all the data:
In[6]:=
Click for copyable input
Out[6]=
In[7]:=
Click for copyable input
Out[7]=
Insert more data:
In[8]:=
Click for copyable input
In[9]:=
Click for copyable input
Out[9]=
Update only data matching a condition:
In[10]:=
Click for copyable input
Out[10]=
In[11]:=
Click for copyable input
Out[11]=
In[12]:=
Click for copyable input
In[13]:=
Click for copyable input
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team