How To Create a Table Index?
Page 1 of 1
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.
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.
Similar topics
» How To Create a Table Index?
» How To Create a New Table by Selecting Rows from Another Table?
» How To Create a New Table?
» How To Create a Testing Table?
» What Is a Table Index?
» How To Create a New Table by Selecting Rows from Another Table?
» How To Create a New Table?
» How To Create a Testing Table?
» What Is a Table Index?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Sun Jan 31, 2010 12:35 am by Micheal
» Accessing tables of other users in SQL
Sun Jan 31, 2010 12:34 am by Micheal
» Grouping commands in SQL
Sun Jan 31, 2010 12:32 am by Micheal
» Operations on Result Sets in SQL
Sun Jan 31, 2010 12:31 am by Micheal
» Subqueries in SQL
Sun Jan 31, 2010 12:30 am by Micheal
» Joining Relations in SQL
Sun Jan 31, 2010 12:28 am by Micheal
» Delete comand in SQL
Sun Jan 31, 2010 12:27 am by Micheal
» Update command in SQL
Sun Jan 31, 2010 12:26 am by Micheal
» Insert command in SQL
Sun Jan 31, 2010 12:23 am by Micheal