When people ask what the difference is between ColdFusion and other server-side scripting languages, I tend to say something along the lines of “it’s designed to make the simple tasks you do all the time really, really easy”. Things like querying databases and looping over results, sending email etc are common tasks that take fewer lines of code in ColdFusion than other languages.
I just read about a new feature of ColdFusion 8 on Ben Forta’s blog that blew me away – not because it was ground-breaking or tricky or a major feature people had been begging for, but because it illustrates exactly what’s cool about ColdFusion: CFQUERY returns a RESULT structure, and if appropriate and the database supports it, the last created identity/auto-increment value is returned automatically for you.
According to Ben, it’s DBMS-specific and the actual name of the variable depends on the database being used, but still it is very handy. It’s easy enough to manually return that value with your query when you need it, but it’s even easier if it’s already there. It probably won’t save anyone a ton of time, but shows that people at Adobe are thinking about how they can make our lives just a little bit easier.