1. how do you delete duplicate rows in a table?
2. can you disable and enable primary key?
3. how do you move tables from one tablespace to another
tablespace?????

Answer Posted / mohapatra.gouranga@gmail.com

1. DELETE FROM table_name A WHERE ROWID > (SELECT min
(rowid) FROM table_name B WHERE A.key_values =
B.key_values);

2. can you disable and enable primary key?
Yes,
e.g., alter table EHIS.HIPARTRANSACTIONDETAILS DISABLE
constraint FK_HIPAR_TRANS

3. how do you move tables/indexes from one tablespace to
another tablespace?

ALTER TABLE <schemaname.tablename> MOVE TABLESPACE
<tablespace_name>;

alter index <owner.indexname> rebuild online tablespace
<target_tablespace_name>;

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the commands you'd issue to show the explain plan for "select * from dual"?

1977


What purpose does the model database server? : sql server DBA

829


Where do you find the default index fill factor and how to change it? : sql server DBA

803


What is the importance of a recovery model? : sql server DBA

767


Explain materialized views and how they are used.

2135


What the different types of replication and why are they used? : sql server DBA

856


What types of replication are supported in sql server? : sql server DBA

983


Define the SGA and: How you would configure SGA for a mid-sized OLTP environment? What is involved in tuning the SGA?

3492


what is the last version,the release date of that version and fix pack of ibm db2 udb?

1705


What are the recovery models for a database? : sql server DBA

813


Why does Oracle not permit the use of PCTUSED with indexes?

2583


who owns the operating system files created by the utl_file package?

813


how can a session indicate its interest in receiving alerts?

777


What are statistics, under what circumstances they go out of date, how do you update them?

2000


What is the difference between dropping a database and taking a database offline? : sql server DBA

804