Why does the following command give a compilation error?

DROP TABLE &TABLE_NAME;

Variable names should start with an alphabet. Here the table name starts with an '&' symbol.

Showing Answers 1 - 3 of 3 Answers

Sally

  • Jun 10th, 2005
 

This would not create a compilation error it executed from SQL*Plus

naveen

  • Sep 19th, 2005
 

this works in oracle9i and it will ask for table name

and the given table will be deleted

  Was this answer useful?  Yes

Poonam Sachdeva

  • Nov 23rd, 2005
 

This does not give an error in Oracle 9i

Following is the output

SQL> DROP TABLE &TABLE_NAME;
Enter value for table_name: temp_special_payslip(this has been eneterd by me)
old   1: DROP TABLE &TABLE_NAME
new   1: DROP TABLE temp_special_payslip

Table dropped.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions