SQLCreateTable
This feature is not supported on the Wolfram Cloud.

SQLCreateTable[conn,table,columns]
creates a new table in an SQL connection.

更多信息更多信息

  • To use SQLCreateTable, you first need to load DatabaseLink using Needs["DatabaseLink`"].
  • SQLCreateTable returns an integer specifying the number of rows affected by the query. If the table is created correctly, this integer will always be zero, as no rows are affected when creating a new table.
  • The following options can be given:
  • "Timeout"$SQLTimeoutthe timeout for the query
    "Index"Nonecolumn(s) to index

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

基本范例  (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
Out[3]=

Specify whether columns can have null values:

In[4]:=
Click for copyable input
Out[4]=

Use different data types:

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

Specify data length:

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