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 view would you use to look at the size of a data file?

3 Answers  


What SQL query from v$session can you run to show how many sessions are logged in as a particular user account?

3 Answers  


What are the different ways of moving data or databases between servers and databases in SQL Server?

3 Answers  


which background process invoke at the time of upgradation tell me???

0 Answers   iGate,


How would you determine who has added a row to a table?

4 Answers  






List out some of the requirements to setup a sql server failover cluster.? : sql server DBA

0 Answers  


i need a brief information about db2 dba course and realtime experts if any plz inform me nareshbhupathi93@gmail.com plzzz urgent

1 Answers   TCS,


If CPU is very slow What can u do to speed up?

1 Answers  


what is the use of recording information about current session?

0 Answers   Oracle,


How would you go about verifying the network name that the local_listener is currently using?

0 Answers  


What are the differences in clustering in sql server 2005 and 2008 or 2008 r2? : sql server DBA

0 Answers  


I have kept recovery catalog on same target database and taken backup of target DB to disk. deleted the target DB & tried to restore and revoer DB using the backup on disk but it is not possible, how do we restore & recover DB

0 Answers  


Categories