没有进入 tables_found 过程将运行,但我需要检查该表是否存在于我的数据库中。
CREATE OR replace PROCEDURE dropdb(tables_found out number) IS
BEGIN
execute immediate 'SELECT COUNT(*) into tables_found FROM user_tables where table_name=''USERS''';
if (tables_found = 1) then
execute immediate ' drop table users';
END IF;
END dropdb;
错误日志:
ora-00905 缺少关键字