Hi All,
I have a problem about the ROWID in a view. I want to simulate a ROWID in a
view just like the same purpose in a table.
For Example:
Create Table foo(id INTEGER PRIMARY KEY AUTOINCREMENT, x TEXT);
insert into foo(x) values('X');
insert into foo(x) values('Y');
insert into foo(x) values('X');
insert into foo(x) values('Z');
Create View v_foo AS
SELECT distinct(x) FROM foo
ORDER BY x desc;
SELECT * from foo;
id x
---------- ----------
1 X
2 Y
3 X
4 Z
My expect result of "select * from v_foo;" is
id x
---------- ----------
1 Z
2 Y
3 X
Would you please help to tell me how to finish that?
Thanks for your grest help.
Thanks,
VK