Softerra LDAP Administrator HelpShow AllHide All

INSERT Statement

The INSERT statement allows creating new LDAP entries.

Syntax

INSERT INTO Parent DN ([attribute-names]) 
VALUES (attribute-values)    

INSERT keywords and attributes

KeywordDescription
INSERT INTO Defines parent DN, to which new entry will be added.
attribute-names Defines names of LDAP attributes that will be added to the new entry. The name of the attribute used in RDN may be explicitly defined with the as RDN keyword. If such attribute is not specified, the attribute defined according to the schema will be used to create the RDN.
VALUES Defines the values of added LDAP attributes.

Examples of INSERT statements

Create new user in "CN=Users,DC=company".

INSERT INTO "CN=Users,DC=company" 
($objectClass, $cn, $sn, $department) 
VALUES (user,"Robert Jones","Jones","IT");

Create new user whose attribute diplayName is dynamicly generated using the defined sn and givenName attributes. The attribute used in RDN is defined explicitly.

INSERT INTO "CN=Users,DC=company" 
($objectClass,$sn,$givenName,$cn,$displayName) 
VALUES ('user','Thomas','Walker','Thomas Walker', $sn || ' ' || $givenName);