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 / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

how do we explain a project in cognos in an interview? please help me. Also how do we perform testing in cognos after creating reports?

2972


what do you understand by fine-grained auditing?

634


What are the high-availability solutions in sql server and differentiate them briefly? : sql server DBA

598


How to craeate the New Database Schema in Oracle and mysql? Please tell me with Example?

1904


what is a crs resource?

602






Which autogrowth database setting is good? : sql server DBA

581


What is a system database and what is a user database? : sql server DBA

600


how can you get actual data change values from previous transactions in oracle?

614


If you are given access to a sql server, how do you find if the sql instance is a named instance or a default instance? : sql server DBA

564


what is the use of ocr?

602


What are the different sql server versions you have worked on? : sql server DBA

545


Can you tell me about your experience with the administration of COTS system..? Also, how do you set up seed data..?

2191


Illustrate how to determine the amount of physical CPUs a Unix Box possesses (LINUX and/or Solaris).

1494


Query processing is slow(eg select query)how will u solve that

6519


what functionality does oracle provide to secure sensitive information?

554