> I am being space conscious and have declared a PK for a table
> with a data type of TINYINT because I will never have more
> than 255 records. My records don't have suitable unique values
> so I wanted to use the IDENTITY attribute in SQL Svr to
> automatically create the primary keys. Trouble is that once
> I delete one of the records, that PK value will never be used
> again.
>
> Is there a clever way in CF to create the PK yourself and be
> able to reuse the value when it is deleted.

I would strongly recommend that you simply use a regular INT column that
will let you use IDENTITY values normally. Your desire to be
"space-conscious" will cost you more than it's worth. In addition, I would
strongly recommend that you not attempt to reuse surrogate primary key
values. This may add significant complexity to the database, and won't
provide any benefit.

Can you explain what exactly you're concerned about, with regard to space?

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to