Here’s another ColdFusion 8 goodie that I just learned about yesterday …
If you are using a database table with an identity (auto-increment) field, ColdFusion 8 can automatically return the newly created field value for you, without needing a trigger or a subsequent
- SQL Server: result.IDENTITYCOL
- Oracle: result.ROWID
- Sybase: result.SYB_IDENTITY
- Informix: result.SERIAL_COL
- DB2: result.KEY_VALUE
- MySQL: result.GENERATED_KEY (MySQL 4 and 5 only, MySQL 3 does not support this feature)
Very nice indeed!
Leave a Reply