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?????

Answers were Sorted based on User's Feedback



1. how do you delete duplicate rows in a table? 2. can you disable and enable primary key? 3. how ..

Answer / 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

1. how do you delete duplicate rows in a table? 2. can you disable and enable primary key? 3. how ..

Answer / anil kumar prajapati

1. DELETE FROM
table_name A
WHERE
a.rowid >
ANY (
SELECT
B.rowid
FROM
table_name B
WHERE
A.col1 = B.col1
AND
A.col2 = B.col2
);
2.CREATE TABLE table_name
(
column1 datatype null/not null,
column2 datatype null/not null,
...

CONSTRAINT constraint_name PRIMARY KEY (column1, column2,
... column_n)
);
3.ALTER TABLE <TABLE NAME to be moved> MOVE TABLESPACE
<destination TABLESPACE NAME>

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB Administration Interview Questions

what is meant by gateway

1 Answers   IBM,


Give the reasoning behind using an index.

2 Answers  


Explain the difference between a FUNCTION, PROCEDURE and PACKAGE.

0 Answers  


How do you trace the traffic hitting a sql server? : sql server DBA

0 Answers  


which background process will run @ the time of creation of catalog database

1 Answers   CSC,






How do you tell what your machine name is and what is its IP address?

4 Answers  


What is RAID and what are different types of RAID configurations?

1 Answers  


What is dbcc? : sql server DBA

0 Answers  


Name two files used for network connection to a database.

5 Answers  


. I have my backup RMAN script called "backup_rman.sh". I am on the target database. My catalog username/password is rman/rman. My catalog db is called rman. How would you run this shell script from the o/s such that it would run as a background process?

0 Answers  


Explain the use of table functions.

1 Answers  


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

0 Answers  


Categories