SQLDelete
This feature is not supported on the Wolfram Cloud.

SQLDelete[conn,table]
deletes the data in a table in an SQL connection.

SQLDelete[conn,SQLTable[table]]
deletes the data in a table in an SQL connection.

SQLDelete[conn,table,cond]
deletes data that matches cond.

更多信息更多信息

  • To use SQLDelete, you first need to load DatabaseLink using Needs["DatabaseLink`"].
  • Use this function with caution, as you can lose data permanently!
  • Returns an integer specifying the number of rows affected by the query.
  • The following option can be given:
  • "Timeout"$SQLTimeoutthe timeout for the query

范例范例打开所有单元关闭所有单元

基本范例  (1)基本范例  (1)

In[1]:=
Click for copyable input

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 package, as described in Using the Example Databases.

Open a connection:

In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input

Delete all the data in a table:

In[5]:=
Click for copyable input
Out[5]=
In[6]:=
Click for copyable input
Out[6]=

Delete data matching a condition:

In[7]:=
Click for copyable input
In[8]:=
Click for copyable input
Out[8]=
In[9]:=
Click for copyable input
Out[9]=
In[10]:=
Click for copyable input
In[11]:=
Click for copyable input