Jika Anda mengatur atribut hasil di cfquery
tag kunci utama dikembalikan tanpa SQL tambahan
<cfquery datasource="x" result="resultName">
INSERT INTO...
</cfquery>
<cfset newID = resultName.IDENTITYCOL />
- MSSQL:
IDENTITYCOL
- Oracle:
ROWID
- Sybase:
SYB_IDENTITY
- Informix:
SERIAL_COL
- Mysql:
GENERATED_KEY