Oracle Interview questions


Total available count: 35
Subject - Databases
Subsubject - Oracle

How will you delete duplicating rows from a base table?

DELETE FROM table_name slightBook1 WHERE rowid>(SELECT min(rowid) from table_name slightBook2 where slightBook2.table_no=slightBook1.table_no);
CREATE TABLE slightBook2(new_table) AS SELECT DISTINCT * FROM slightBook1(old_table);
DROP old_table RENAME slightBook3(new_table) TO slightBook2(old_table) DELETE FROM table_name slightBook1 WHERE rowid NOT IN (SELECT MAX(ROWID) FROM table_name GROUP BY column_name);

 




Next 5 interview question(s)

1
What is difference between SQL and SQL*PLUS?
2
What is difference between UNIQUE and PRIMARY KEY constraints?
3
What are different Oracle database objects?
4
What is the difference between rename and alias?
5
How do we create privileges in Oracle?