Home >> FAQs/Tutorials >> Oracle Tutorials

Oracle Tutorials - CREATE INDEX - Create a Table Index

By: FYIcenter.com

(Continued from previous topic...)

How To Create a Table Index?

If you have a table with a lots of rows, and you know that one of the columns will be used often a search criteria, you can add an index for that column to in improve the search performance. To add an index, you can use the CREATE INDEX statement as shown in the following script:

CREATE TABLE tip (id NUMBER(5) PRIMARY KEY,
  subject VARCHAR(80) NOT NULL,
  description VARCHAR(256) NOT NULL,
  create_date DATE DEFAULT (sysdate));
Table created.
  
CREATE INDEX tip_subject ON tip(subject);
Index created.

(Continued on next topic...)

  1. What Are DDL Statements?
  2. How To Create a New Table?
  3. How To Create a New Table by Selecting Rows from Another Table?
  4. How To Add a New Column to an Existing Table?
  5. How To Delete a Column in an Existing Table?
  6. How To Drop an Existing Table?
  7. How To Create a Table Index?
  8. How To Rename an Index?
  9. How To Drop an Existing Index?
  10. How To Create a New View?
  11. How To Drop an Existing View?

Oracle Tutorials:

More...


Other Tutorials/FAQs:

More...


Related Resources:

More...


Selected Jobs:

More...