Home » RDBMS Server » Server Administration » Describe Sequence
Describe Sequence [message #314732] Thu, 17 April 2008 11:56 Go to next message
ORAGENASHOK
Messages: 238
Registered: June 2006
Location: Chennai
Senior Member
Can i view sequence data and how
Re: Describe Sequence [message #314736 is a reply to message #314732] Thu, 17 April 2008 12:10 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
[DBA|ALL|USER]_SEQUENCES
Re: Describe Sequence [message #314737 is a reply to message #314732] Thu, 17 April 2008 12:11 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What do you mean sequence data?
Value? call nextval.
Metadata? query user/all/dba_sequences

Regards
Michel
Re: Describe Sequence [message #314931 is a reply to message #314737] Fri, 18 April 2008 05:39 Go to previous messageGo to next message
ORAGENASHOK
Messages: 238
Registered: June 2006
Location: Chennai
Senior Member
According to my understanding SEQUENCE is used to generate sequence number for primary key/unique key column value.

First time reference for currval return sequence number.
First time reference for nextval return initial value and subsequent reference will return with currval in addition of increment value

please correct me if i am wrong


I can't understand the question mention below
Value? call nextval.
Metadata?
Re: Describe Sequence [message #314933 is a reply to message #314931] Fri, 18 April 2008 05:43 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
According to my understanding SEQUENCE is used to generate sequence number for primary key/unique key column value.

Sequence purpose is to generate and is sometimes used to generate unique key.

Quote:
I can't understand the question mention below

Don't care about that, simply I don't understand your first question, explain it.

Regards
Michel
Re: Describe Sequence [message #314935 is a reply to message #314933] Fri, 18 April 2008 05:47 Go to previous messageGo to next message
ORAGENASHOK
Messages: 238
Registered: June 2006
Location: Chennai
Senior Member
A sequence is a schema object that can generate unique sequential values.
Re: Describe Sequence [message #314938 is a reply to message #314933] Fri, 18 April 2008 05:54 Go to previous messageGo to next message
ORAGENASHOK
Messages: 238
Registered: June 2006
Location: Chennai
Senior Member
I have created (cust_seq) a sequence in scott/tiger login already there is another sequence in user_sequences (emp_seq).

when i am select the nextval using below query it will return 2 row

select cust_seq.nextval from dual;


But when i am using the same query in Forms 6i it will give next sequential number.

Can you please explain why this difference.

[Updated on: Fri, 18 April 2008 06:07]

Report message to a moderator

Re: Describe Sequence [message #314949 is a reply to message #314938] Fri, 18 April 2008 06:28 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
when i am select the nextval using below query it will return 2 rows

Then you have a problem with DUAL not with the sequence.
Someone either create a dual table with 2 rows in your schema or you insert a second row to standard dual table which is a very bad thing.

Regards
Michel
Re: Describe Sequence [message #314952 is a reply to message #314949] Fri, 18 April 2008 06:37 Go to previous messageGo to next message
ORAGENASHOK
Messages: 238
Registered: June 2006
Location: Chennai
Senior Member
I have mentioned in the select clause as cust_seq.nextval is there any column name like cust_seq.nextval in dual table.

and i have checked there is no other table like dual
Re: Describe Sequence [message #314959 is a reply to message #314952] Fri, 18 April 2008 06:45 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This is completly meaningless.
Read about sequence and dual, you seem to not understand what they are.

Regards
Michel
Re: Describe Sequence [message #314962 is a reply to message #314959] Fri, 18 April 2008 06:48 Go to previous message
ORAGENASHOK
Messages: 238
Registered: June 2006
Location: Chennai
Senior Member
Good service Thanks michel
Previous Topic: Migration from 32-bit Oracle to 64-bit Oracle
Next Topic: Findind size of Oracle Database
Goto Forum:
  


Current Time: Sun Dec 04 16:48:51 CST 2016

Total time taken to generate the page: 0.06667 seconds