Hello,

Is there a way to have the rowid not null in a view?

------------------------------------------------------------
.nullvalue NULL

create table t(c);
insert into t values(1);
insert into t values(2);

create view v as select * from t, t as t2;
select rowid, * from v;
------------------------------------------------------------

rowid is always null but I want it to be different for every row of the
view. Actually, rowid should only identify a row in the view during a query,
not between two queries on the view (and I suspect this behaviour to be
easier than enforcing serial number to a view's rows).

Oracle has the ROWNUM pseudo column that records the SELECT iterarion
number. I think it could be used to have row serial number in a view.
Is there a work around for sqlite?

I can create my view with a SELECT random(), * ... since random() is now 64
bits, but I definetly prefer small, localized numbers.

--
jt

Reply via email to