Script Development / Microsoft SQL Server
The Microsoft SQL Server Connector primarily provides methods for operating Microsoft SQL Server.
DFF.CONN(...)
parameters are as follows:
Parameter | Type | Required / Default | Description |
---|---|---|---|
connector_id |
str | Required | Connector ID |
database |
str | None |
Specified database |
.query(...)
Executes an SQL statement, parameters are as follows:
Parameter | Type | Required / Default | Description |
---|---|---|---|
sql |
str | Required | SQL statement, which can include parameter placeholders.? indicates parameters to be escaped;?? indicates parameters not to be escaped |
sql_params |
list | None |
SQL parameters |
Example | |
---|---|
1 2 3 |
|
Dynamic SQL Statement
query(...)
and non_query(...)
internally use DFF.SQL(...)
to construct SQL statements and support the construction of complex dynamic SQL statements.
For example, WHERE IN (...)
with an uncertain number of values, or INSERT INTO ... VALUES ...
for batch data insertion, etc.
For details, please refer to Script Development / SQL Construction DFF.SQL