删除Oracle 10g中的表,但使用where where condition

use*_*444 2 sql oracle

如何在oracle中删除表,但我想在查询中使用where条件; 例如:

drop table employees where employee_id='100';
Run Code Online (Sandbox Code Playgroud)

这可能吗?

Ben*_*Ben 11

你不是在看DROP桌子; 删除表将删除整个表及其中的所有数据.

看起来好像要从表中删除一些行.如果是这种情况,您应该使用以下DELETE声明:

delete from employees where employee_id = 100;
Run Code Online (Sandbox Code Playgroud)

在继续之前,可能值得研究一些基本功能或参加课程.

顺便提及,100是数字.使用'意味着它是一个字符串.如果EMPLOYEE_ID列的数据类型是数字,则不需要引用它.