You don't, the idea is that the database knows about it and takes care of
it.

This way the only time you need to put the ID field in any query is the
actual update query, so that you know which record is going to be updated
correctly.


-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: Saturday, 19 December 2009 7:04 AM
To: cf-newbie
Subject: How to add new column with (Is Identity)


This is an SQL question, but I hope someone can help.

I have a table that I need to add a new ID column that starts with any
number and increments by 1. I can do this automatically in the Design if I
am creating a new table, by setting this up in Identity Specification. But
how do I write an SQL statement to add numbers in an existing table, in a
new column, that are consecutive and unique that already has over 1000
records? After I have the new field filled with numbers, then I can go to
the Column Properties and set up Identity Specification to add a new ID
number to new records that is consecutive.

Nancy Graham
Air Cargo Web Developer
502.329.3263








~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4930
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to