Text Application Developer's Guide
ContentsOpens a new window
Opens a new window
Page 31 of 321

Creating the Table

Perform the following steps to create and load the table.

  1. Connect as the Appropriate User

    Connect as the CTXAPP role the user myuser:

    CONNECT myuser;
    
  2. Create Your Table

    Set up an auction table to store your inventory:

    CREATE TABLE auction(
    item_id NUMBER,
    title VARCHAR2(100),
    category_id NUMBER,
    price NUMBER,
    bid_close DATE);
    

    Figure 2-1Opens a new window illustrates this table.

  3. Populate Your Table

    Populate the table with various items, each with an id, title, price and bid_date:

    INSERT INTO AUCTION VALUES(1, 'NIKON CAMERA', 1, 400, '24-OCT-2002');
    INSERT INTO AUCTION VALUES(2, 'OLYMPUS CAMERA', 1, 300, '25-OCT-2002');
    INSERT INTO AUCTION VALUES(3, 'PENTAX CAMERA', 1, 200, '26-OCT-2002');
    INSERT INTO AUCTION VALUES(4, 'CANON CAMERA', 1, 250, '27-OCT-2002');