Results 1 to 2 of 2

Thread: create table

  1. #1
    Join Date
    Nov 2004
    Posts
    35

    Unanswered: create table

    i have seen alot of people here solve their problem by creating a table..
    can anyone explain the use of the table create?
    the advatage and disadvantage or it..
    is the table create really in the database or just virtually?
    any more info would be welcome..
    thanks.

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    There are database tables (CREATE TABLE ...) and there are collection data type also called tables (just to confuse everyone!)

    Database tables are permanent objects and should not be created by your programs.

    Programs may make use of collections for storing data in memory for processing - e.g.:

    Code:
      1  DECLARE
      2    TYPE ename_tab_type IS TABLE OF emp.ename%TYPE INDEX BY BINARY_INTEGER;
      3    ename_tab ename_tab_type;
      4  BEGIN
      5    SELECT ename BULK COLLECT INTO ename_tab FROM emp;
      6    FOR i IN 1..ename_tab.COUNT LOOP
      7      DBMS_OUTPUT.PUT_LINE(ename_tab(i));
      8    END LOOP;
      9* END;
    SQL> /
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •