how can stop the sequence with mention the max value and
with out mention the max value



how can stop the sequence with mention the max value and with out mention the max value..

Answer / lipika

To create a sequence that stops at a predefined limit, for
an ascending sequence, specify a value for the MAXVALUE
parameter.
For a descending sequence, specify a value for the MINVALUE
parameter. Also specify NOCYCLE. Any attempt to generate a
sequence number once the sequence has reached its limit
results in an error.

NOTE:-Interval between the sequence value must be less than
the difference of MAXVALUE and MINVALUE. If this value is
negative, then the sequence descends. If the value is
positive, then the sequence ascends. If you omit this
clause, then the interval defaults to 1.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What is sql indexing?

0 Answers  


how many values can the set function of mysql take? : Sql dba

0 Answers  


Is record in oracle pl sql?

0 Answers  


what are the 'mysql' command line options? : Sql dba

0 Answers  


how to install mysql? : Sql dba

0 Answers  






what are the join types in tsql? : Transact sql

0 Answers  


what is blob? : Sql dba

0 Answers  


What can sql server reporting services do?

0 Answers  


Hi Guys, I have a situation where I need to access the column values from rowtype variable. However, the column names are dynamic. below is sample code: declare Cursor c1 is select * from emp; Cursor c2 is select column_name from xyztable; v_c2 c2%rowtype; v_str varchar2 v_value varchar2(200); begin for rec in c1 loop open c2;---this cursor has column names like EMPLOYEE_ID, FIRST_NAME, LAST_NAME etc. loop fetch c2 into v_c2; exit when c2%notfound; /* now lets say i want to access value of LAST_NAME from cursor c1, so I am writing below code, however it does not work as expected */ v_str:= 'rec.'|| v_c2.column_name; -- this will give me string like "rec.EMPLOYEE_ID" v_value:=v_str; end loop; end loop; end; / Plz help ASAP.Thanks.

2 Answers  


How would you convert date into julian date format?

0 Answers  


How do I copy a table in sql?

0 Answers  


What is the purpose of cursors in pl/sql?

0 Answers  


Categories