My Oracle Support Banner

A Sequence Prefixed by Schema Name Fails With PLS-00302: component 'SEQUENCE_NAME' must be declared (Doc ID 1371201.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version: 10.2.0.4 to 11.2.0.3 - Release: 10.2 to 11.2
Information in this document applies to any platform.

Symptoms

  A sequence with a schema name qualified fails in a pl/sql block with
PLS-00302: component 'SEQUENCE_NAME' must be declared

Example

DECLARE
   l_number  NUMBER := 0;
BEGIN
   SELECT SCOTT.MY_SEQ.NEXTVAL
   INTO l_number
   FROM dual;
   DBMS_OUTPUT.PUT_LINE(L_NUMBER);
END;

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
  Symptoms
  Cause
  Solution
  References

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.