Lets say that i have to make 5 tables which need a number as a primary key.
Can I use the same sequence for all these tables or do i have to create a new one for each ?
Is there a statement which
– finds out all the existing sequences so that we can choose one ?
– Shows all the sequences for a particular user/particular schema ?
Lets say that i have to make 5 tables which need a number as
Share
You can use one sequence for all, but if you have to insert many rows thus will be a bottleneck. Each time one row is inserted the other inserts have to wait. I prefer to use one sequence for each table.
As sequences are db objects you can query them from the catalog.