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
how can you implement fine-grained auditing?
Draft one mock email requesting your non-technical management grant you downtime to (provide justification where applicable) complete the following tasks: (1) Generate statistics on a large table; (2) Generate an RDA – if you don't know what an RDA is please say so. (3) Rename datafiles.
You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance?
what is grd?
In which dictionary table or view would you look to determine at which time a snapshot or MVIEW last successfully refreshed?
what are the performance views in an oracle rac environment?
Why does Oracle not permit the use of PCTUSED with indexes?
how can you get actual data change values from previous transactions in oracle?
How would you extract DDL of a table without using a GUI tool?
What are the commands used in dcl? : sql server DBA
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
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
A table is classified as a parent table and you want to drop and re-create it. How would you do this without affecting the children tables?
what is a crs resource?
Oracle client is not able to connect to Oracle server although tnsnames.ora file has valid enteries. Oracle error message is “ cannot resolve net service name”. Mention any three reasons.