Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What Happens to Indexes If You Drop a Table
What Happens to Indexes If You Drop a Table? - Oracle DBA FAQ - Managing Oracle Table Indexes
✍: FYIcenter.com
If you drop a table, what happens to its indexes? The answer is that if a table is dropped, all its indexes will be dropped too. Try the following script to see yourself:
CREATE TABLE student (id NUMBER(5) PRIMARY KEY, first_name VARCHAR(80) NOT NULL, last_name VARCHAR(80) NOT NULL, birth_date DATE NOT NULL, social_number VARCHAR(80) UNIQUE NOT NULL); Table created. CREATE INDEX student_birth_date ON student(birth_date); Index created. SELECT index_name, table_name, uniqueness FROM USER_INDEXES WHERE table_name = 'STUDENT'; INDEX_NAME TABLE_NAME UNIQUENES ----------------------- --------------------- --------- SYS_C004141 STUDENT UNIQUE SYS_C004142 STUDENT UNIQUE STUDENT_BIRTH_DATE STUDENT NONUNIQUE DROP TABLE STUDENT; Table dropped. SELECT index_name, table_name, uniqueness FROM USER_INDEXES WHERE table_name = 'STUDENT'; no data found
No records in USER_INDEXES view found for your name STUDENT, after you dropped STUDENT table.
2007-05-02, 6770👍, 0💬
Popular Posts:
How To Wirte a Simple JUnit Test Class? This is a common test in a job interview. You should be able...
How to create a thread in a program? You have two ways to do so. First, making your class "extends" ...
What’s the difference between Unit testing, Assembly testing and Regression testing? Unit testing is...
What is CodeDom? “CodeDom” is an object model which represents actually a source code. It is designe...
What is Traceability Matrix? Traceability Matrix is one of the document will prepare by QA.To make s...