When creating multi-level (chained) insert operations where the primary key of the parent MBO is set to autoincrement, use the "@@identity" parameter in the select statement to provide the chained insert value.
This method of creating a multilevel insert operation is useful if the primary key is set to autoincrement, you are making the relationship between two related Adaptive Server Enterprise/SQL Anywhere database mobile business objects, and you are creating them from the tool palette within the Mobile Application Diagram.
Since "id" is set to autoincrement, each new row added to the table is uniquely identified. ("id" becomes "@@identity" from the first SQL insert statement).
INSERT INTO sampledb.dba.customer ( fname, lname, address, city, state, zip, phone, company_name) VALUES ('["id"=":id"]', '["fname"=:fname"]', '["lname"=":lname"]', '["address"=":address"]', '["city"=":city"]', '["state"=":state"]', '["zip"=":zip"]', '["phone"=":phone"]', '["company_name"=":company_name"]' ) SELECT * FROM sampledb.dba.customer WHERE id=@@IDENTITY
"id" is a primary key column of identity(or autoincrement) type. Notice that the extra select statement and 'id' are not part of the insert statement itself.