INSERT

INSERT

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

INSERT

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

Syntax

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

[EVALUATE clause] [clause]

Parameters

objectThe name of an EntitySet or relationship with fields to which you want to add a record. A role name can be used.
fieldA 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.
expr1An 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).
NULLThis 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?
5 out of 5 stars

1 rating

5 Stars 100%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

2 comentários

  1. Jason Lee disse:

    Updated Description.

  2. Ricardo disse:

    63/5000 The syntax description is overlapping the label “Parameters”

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

pt_BRPortuguese