Quote:
|
Originally Posted by nav_jav
what is the relation between view and Sequence.
|
The similarity is that both are sort of "virtual tables", i.e., not physically stored but their data is "generated" when they are interrogated.
Apart from that, not much similarity.
If by "relation" you mean: use one in the definition of the other:
it is *not* possible to define a view where one column contains all values ever generated by a sequence. If that's what you want, you have to "materialize" those values, i.e., create a table, not a view.
And if that's all the sequence would be used for, then an identity column would be the more appropriate thing to use.