command-insert

Use this command to insert a new row into a table.

Format

INSERT INTO Table [ ( ColRef [ , ColRef ]* ) ]

{ DEFAULT VALUES | VALUES ( insert-element [ , insert-element ]* ) | query-expr }

Remarks

The INSERT command inserts new row(s) into a table.

Example:

INSERT INTO CPointAlgManual (FullName, FullScale, ZeroScale, Units)

VALUES ('ExistingGroup.NewPoint', 10.0, 0.0, 'Metres')

Required Permissions

To successfully use this command, the User Account of the user that is executing the command has to be assigned the relevant permissions for the parent Group, Group Template, or Group Instance into which each new database item is being inserted. The User Account has to have permission to write to every field that is being initialized for each new database item. The permissions vary per field; these are shown in the Database Schema alongside each field (see Configuration Fields and Data Fields Section in the Geo SCADA Expert Guide to the Database). Also see User Access Considerations when Working with SQL.

If the database items are security related, the User Account also has to be assigned the Security permission on the parent Group, Group Template, or Group Instance into which the security-related database items are being inserted (see User Access Considerations when Working with SQL).

Some types of table are special cases; for further information, see User Access Considerations when Working with SQL.