我正在尝试使用存储过程并检查特定的表并使用IF THEN条件来删除表。是否可以在条件块中发出DROP语句?
delimiter $$
CREATE PROCEDURE FC_SQLF()
BEGIN
DECLARE SQLFOUND int;
SET @SQLFOUND = (select count(table_name) from information_schema.tables where table_schema = 'testdb' and table_name = 'temp_table');
IF @SQLFOUND = 1 THEN DROP TABLE testdb.abcd;
END IF;
END $$