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 can you record information about current session?

493


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

595


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

1520


In what script is "snap$" created? In what script is the "scott/tiger" schema created?

1944


How to bind a cobol module to a given job? I am not able to understand this concept.Can anyone help me out as how to carry out this task?

1653






What are the steps you will take to improve performance of a poor performing query?

2417


when we login sql editor using username and password then it says this error "could not resolve service name" then what can we do at client side.( here thing is tnsnames.ora file is ok till yesterday and worked well, but now it giving error.

1233


Does any body has ORACLE Certification Dumps or Materials on 9i DBA, 10G DBA, Internet Application Developer, OCP 8i to 10g DBA Upgrade, Oracle 11i if any body have it, please kindly drop an email to: taruni_2k8@yahoo.com

1723


how can a session indicate its interest in receiving alerts?

563


How do you open a cluster administrator? : sql server DBA

579


what is a user-defined lock?

584


What is fill factor? : sql server DBA

642


What is transparent data encryption? : sql server DBA

562


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

1974


what is the role of dip user in our database?

2045