title: Oracle invalid use of type name or subtype name
body: <p>What is wrong with the this block am using? please help to solve this.
  Only one row will be selected based on the where clause.</p>
  
  <p><strong>Table clazzes</strong></p>
  
  <pre><code>Name Type          Nullable Default Comments 
  ---- ------------- -------- ------- -------- 
  ID   NUMBER(10)                              
  NAME VARCHAR2(100) Y        
  </code></pre>
  
  <p><strong>PL/SQL Block :</strong></p>
  
  <pre><code>declare
  type clazzes_row_type is record
  (clazz_rownum number,
   clazz_id clazzes.id%type,
   clazz_name clazzes.name%type);
  begin
  clazzes_row_type.clazz_rownum :=111;
  select id,name into clazzes_row_type.clazz_id,clazzes_row_type.clazz_name
  from clazzes where name ='leo1';
  dbms_output.put_line(clazzes_row_type.clazz_id);
  dbms_output.put_line(clazzes_row_type.clazz_rownum);
  dbms_output.put_line(clazzes_row_type.clazz_name);
  end;
  </code></pre>
  
  <p><strong>Exception :</strong></p>
  
  <pre><code>ORA-06550: line 8, column 1:
  PLS-00330: invalid use of type name or subtype name
  ORA-06550: line 8, column 1:
  PL/SQL: Statement ignored
  ORA-06550: line 9, column 21:
  PLS-00330: invalid use of type name or subtype name
  ORA-06550: line 9, column 75:
  PL/SQL: ORA-00904: : invalid identifier
  ORA-06550: line 9, column 1:
  PL/SQL: SQL Statement ignored
  ORA-06550: line 11, column 22:
  PLS-00330: invalid use of type name or subtype name
  ORA-06550: line 11, column 1:
  PL/SQL: Statement ignored
  ORA-06550: line 12, column 22:
  PLS-00330: invalid use of type name or subtype name
  ORA-06550: line 12, column 1:
  PL/SQL: Statement ignored
  ORA-06550: line 13, column 22:
  PLS-00330: invalid use of type name or subtype name
  ORA-06550: line 13, column 1:
  PL/SQL: Statement ignored
  </code></pre>