Basic Oracle Concepts and Programming Question:
Download Job Interview Questions and Answers PDF
How To Drop an Existing Table in Oracle?
Answer:
If you want to delete an existing table and its data rows, you can use the DROP TABLE statement as shown in this script:
SQL> connect HR/globalguideline
Connected.
SQL> CREATE TABLE emp_dept_10
2 AS SELECT * FROM employees WHERE department_id=10;
Table created.
SQL> DROP TABLE emp_dept_10;
Table dropped.
Be careful, when you use the DROP TABLE statement. All data rows are gone too.
SQL> connect HR/globalguideline
Connected.
SQL> CREATE TABLE emp_dept_10
2 AS SELECT * FROM employees WHERE department_id=10;
Table created.
SQL> DROP TABLE emp_dept_10;
Table dropped.
Be careful, when you use the DROP TABLE statement. All data rows are gone too.
Download Oracle Database Interview Questions And Answers
PDF
Previous Question | Next Question |
How To Delete a Column in an Existing Table in Oracle? | How To Create a Table Index in Oracle? |