Paul DuBois wrote:
> >mab@stripped wrote:
> >> I have a table with two columns.
> >> The first is "rowid" and is auto-incremented.
> >> The second is an int named "id".
> >> When I do an insert, I only set the "id" field.
> >> But _sometimes_ I would like the "id" field to be
> >> the same as that which will go into the "rowid"
> >> field. But I don't know what the rowid will be when
> >> I do the insert. Is there any way to set id to be
> >> the same as what the row id will be without doing
> >> a separate query to find out what the last rowid is?
> >> Thanks,
> >> Mark
> >Why would you want two fields to contain the same value?
> >That is wasteful and confusing.
> If it were always that way, yes. But he said he only wants
> it that way sometimes.
That must make for some interesting queries.
Is id set to zero for inactive users, and set to rowid when they
pay their bill or something?
I'm just curious, because it doesn't sound normalized to me without