How to access the current value and next value from a
sequence?
Answer Posted / shai
select *
from user_sequences;
The last_number column will display the number available
next.
if no_cache is used in sequence definition then you can
trust on last_number column from user_sequence.
But if cache is used then below will take place:
If Cache is 20 then last_number will display any number
within range of sequence currval+20
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How can you create an empty table from an existing table?
How can you get sql*loader to commit only at the end of the load file? : aql loader
how to analyze tables with 'mysqlcheck'? : Sql dba
what is a tablespace? : Sql dba
How do I view a table in sql?
Suppose a student column has two columns, name and marks. How to get name and marks of the top three students.
What has stored procedures in sql and how we can use it?
Is time a data type in sql?
Difference between global and parameter variables?
What is the non-clustered index in sql?
What is assignment operator in pl sql?
What is the purpose of primary key?
Explian rowid, rownum? What are the psoducolumns we have?
C. Normalize the following data up to the 3rd Normal form. Create the tables and insert the data given. Emp_ID Name Dept_Name Salary Course_Title Date_Completed 100 Adam Marketing 48,000 SPSS 6/19/2008 Surveys 10/7/2008 140 Bob Accounting 52,000 Tax Acc 12/8/2008 110 Cathy IT SQL Server 1/12/2008 C# 4/22/2008 190 Dan Finance 150 Emily Marketing 55,000 SPSS 6/16/2008 42,000 Analysis 8/12/2008 Queries 1. Find all Names who have completed the SPSS Course. 2. Find employee with max salary. 3. Find employee with 2nd max salary. 4. Find all employees in Dept “Marketing”. 5. Find all the employees who have taken more than 2 courses. 6. Find all the employees who have completed the courses before month of September.
What is a table partition?