On 02/10/06, Tom Chiverton <[EMAIL PROTECTED]> wrote:
What is the difference betwen the booleans 'primaryKey' and 'identity' in the
context of a particular column ?
Isn't a PK an identity ?
Well yes..... But a primary key doesn't have to be an identity. Actually, come to that I don't think an identity has to be a primary key either.
Identity is the MS SQL name for a field that automagically increments when you add a new record to your database.
A PK can be anything, as long as its unique. It can be the value "potato" as long as there are no other potatoes in the table, but you must specify a value when adding a new record. A record with an identity type PK does not need to have its PK set before saving it to the database.
Stephen
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
