Add table column
Adds a new column to an existing table
Function AddTableColumn(Val Table, Val Name, Val DataType, Val Connection = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Table | --table | String | ✔ | Table name |
Name | --name | String | ✔ | Column name |
DataType | --type | String | ✔ | Column data type |
Connection | --db | String, Arbitrary | ✖ | Existing connection or database path |
Returns: Map Of KeyAndValue - Result of query execution
1C:Enterprise/OneScript code example
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_B4C9_162.sqlite";
Table = "test";
Name = "new_col";
DataType = "TEXT";
Result = OPI_SQLite.AddTableColumn(Table, Name, DataType, Base);
- Bash
- CMD/Bat
oint sqlite AddTableColumn \
--table "test" \
--name "new_col" \
--type "TEXT" \
--db "C:\Users\Administrator\AppData\Local\Temp\0rltbbruj1o.sqlite"
oint sqlite AddTableColumn ^
--table "test" ^
--name "new_col" ^
--type "TEXT" ^
--db "C:\Users\Administrator\AppData\Local\Temp\0rltbbruj1o.sqlite"
Result
{
"result": true
}