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
Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.
Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down? : sql server DBA
What is the difference between clustered and non-clustered index? : sql server DBA
What are the steps you will take to improve performance of a poor performing query?
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?
how does an oracle clusterware manage crs resources?
In what script is "snap$" created? In what script is the "scott/tiger" schema created?
how can a session indicate its interest in receiving alerts?
Explain about your sql server dba experience? : sql server DBA
what are the performance views in an oracle rac environment?
Which autogrowth database setting is good? : sql server DBA
how can you enable flashback feature?
How do you troubleshoot errors in a sql server agent job? : sql server DBA
Other than making use of the statspack utility, what would you check when you are monitoring or running a health check on an Oracle 8i or 9i database?
How to craeate the New Database Schema in Oracle and mysql? Please tell me with Example?