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, 7216👍, 0💬
Popular Posts:
Which bit wise operator is suitable for turning off a particular bit in a number? The bitwise AND op...
What is difference between Association, Aggregation and Inheritance relationships? In object oriente...
How To Control Horizontal Alignment? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells By...
What is cross page posting? By default, button controls in ASP.NET pages post back to the same page ...
What is difference between SITP and UTP in testing ? UTP (Unit Test Plan) are done at smallest unit ...