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 / mohapatra.gouranga@gmail.com
1. DELETE FROM table_name A WHERE ROWID > (SELECT min
(rowid) FROM table_name B WHERE A.key_values =
B.key_values);
2. can you disable and enable primary key?
Yes,
e.g., alter table EHIS.HIPARTRANSACTIONDETAILS DISABLE
constraint FK_HIPAR_TRANS
3. how do you move tables/indexes from one tablespace to
another tablespace?
ALTER TABLE <schemaname.tablename> MOVE TABLESPACE
<tablespace_name>;
alter index <owner.indexname> rebuild online tablespace
<target_tablespace_name>;
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is dbcc? : sql server DBA
what is the use of ocr?
what are the differences of where and if in SAS?
What is the difference between the 2 operating modes of database mirroring? : sql server DBA
What would you do with an "in-doubt" distributed transaction?
What authentication modes does sql server support? : sql server DBA
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
Explain materialized views and how they are used.
what is grd?
What are the differences in clustering in sql server 2005 and 2008 or 2008 r2? : sql server DBA
What are the different types of indexes available in sql server? : sql server DBA
Where do you find the default index fill factor and how to change it? : sql server DBA
What the different topologies in which replication can be configured? : sql server DBA
how can you process messages in order asynchronously?
You have found corruption in a tablespace that contains static tables that are part of a database that is in NOARCHIVE log mode. How would you restore the tablespace without losing new data in the other tablespaces?