613-518-1166 info@zimdatabases.com

ZIM Language Reference

INSERT

< All Topics

Adds a single record to EntitySets or relationships ( ISQL option only).

Syntax

INSERT INTO object [( field)] VALUES(expr1 | NULL)

[EVALUATE clause] [clause]

Parameters

object The name of an EntitySet or relationship with fields to which you want to add a record. A role name can be used.
field A target field in object. If more than one field is used, the names must be separated from one another by commas. If the field list is omitted, values are assigned to the fields in the order defined in the Object Dictionary.
The number of values must not exceed the number of fields. If field is omitted, it is an error to specify more values than there are fields in object.
expr1 An expression whose value is to be assigned to the corresponding field in the field list; or, if the field list is omitted, to the corresponding field in the Object Dictionary sequence.
Expressions or simple constants can be used. Any number of values can be given, separated from one another by commas. If field is omitted, it is an error to specify more values than there are fields in object.
Fields not explicitly assigned a value become $Null or take their default values. A required field that has no default value must explicitly be assigned a value (unless a SET CHECKNULLS OFF command has been issued).
NULL This value explicitly sets the corresponding field to $Null.

Comments

INSERT adds a single record to the specified object.

Example

insert into Employees ( LastName, Salary) values (“Smith”, 25000)

add Employees let LastName = “Smith” Salary = 25000

The above examples are equivalent.

The following example adds a new employee record for Fred Jones, age 36, whose salary is $30,000.

insert into Employees values (“Jones”, “Fred”, 36, 30000)


See Also

ADD

Conventions

SET CHECKNULLS

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Table of Contents