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

what is the use of ocr?

788


You create a private database link and upon connection, fails with: ORA-2085: connects to . What is the problem? How would you go about resolving this error?

1746


what functionality does oracle provide to secure sensitive information?

759


What is replication? : sql server DBA

847


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

762


can u plz tell me what r the mandatory skills for getting job as a sql dba......plz send me all details thank you my id :k.mohann.mohan@gmail.com

1518


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

984


In which dictionary table or view would you look to determine at which time a snapshot or MVIEW last successfully refreshed?

2417


what are the types of connection load-balancing?

748


suppose you want to audit specific activities on sensitive data. How can you achieve that?

753


How many files can a database contain in sql server?how many types of data files exists in sql server? How many of those files can exist for a single database? : sql server DBA

900


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

1706


Database crashes. Corruption is found scattered among the file system neither of your doing nor of Oracle's. What database recovery options are available? Database is in archive log mode.

1958


What authentication modes does sql server support? : sql server DBA

896


Can you redefine a table online?

876