SQL-001: Insert preference — sequence key generation¶
This is the inline USER_PREFERENCE_SEQ.nextval expression embedded directly in the VALUES clause of the SQL-004 INSERT statement inside InsertPref. There is no separate SELECT ... NEXTVAL FROM DUAL round trip — the sequence value is generated as part of the single INSERT execution.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-001 |
| Operation type | Create (Sequence) |
| Execution method | Inline SQL (embedded expression within SqlHelper.ScalarQuery<int>.Execute) |
| Database | Oracle |
| Schema | [unqualified]** |
| Command type | Text |
| Business object | PreferenceData |
| Criteria property | n/a (no IBusinessCriteria) |
| Lifecycle method | InsertPref |
Parameters¶
No bind parameters. The next primary-key value is generated via the inline USER_PREFERENCE_SEQ.nextval expression embedded in the SQL-004 INSERT's VALUES clause.
Tables¶
| Table | Access | Columns used |
|---|---|---|
| USER_PREFERENCE | INSERT (key source only; no FROM clause) | USER_PREFERENCE_SEQ_NUM |
Sample SQL¶
-- Inline sequence expression embedded in the SQL-004 INSERT statement's VALUES clause
-- (PreferenceData.InsertPref) — not a separate round-trip query:
USER_PREFERENCE_SEQ.nextval
Operations and processes¶
Business rules¶
Sources¶
- SAIF.Framework.Preferences\PreferenceData.cs