Mysql 如何在SQLFIDLE调用存储过程?

Mysql 如何在SQLFIDLE调用存储过程?,mysql,sql,stored-procedures,sqlfiddle,Mysql,Sql,Stored Procedures,Sqlfiddle,我在sqlfiddle的Schema面板中添加了以下内容: CREATE TABLE tb_patient ( `idPatient` INTEGER, `prenomPatient` VARCHAR(12), `nomPatient` VARCHAR(6) )// INSERT INTO tb_patient (`idPatient`, `prenomPatient`, `nomPatient`) VALUES ('267', 'Marie Claude', 'CARRI

我在sqlfiddle的Schema面板中添加了以下内容:

CREATE TABLE tb_patient (
  `idPatient` INTEGER,
  `prenomPatient` VARCHAR(12),
  `nomPatient` VARCHAR(6)
)//

INSERT INTO tb_patient
  (`idPatient`, `prenomPatient`, `nomPatient`)
VALUES
  ('267', 'Marie Claude', 'CARRIE'),
  ('268', 'Marie Claude', 'CARRIE')//


create procedure findTwins()
begin 
    declare getNom varchar(40);
    declare getPrenom varchar(40);
    declare getId int default 1;
    declare getId2 int default 1;
    if(select count(*) from tb_patient group by nomPatient,prenomPatient having count(*)=2 limit 1)
    then
        select nomPatient,prenomPatient into getNom,getPrenom from tb_patient group by nomPatient,prenomPatient having count(*)=2 limit 1; 
        set getId=(select min(idPatient) from tb_patient where nomPatient=getNom and prenomPatient=getPrenom);
        set getId2=(select  max(idPatient) from tb_patient where nomPatient=getNom and prenomPatient=getPrenom);
        select concat(getNom,' ',getPrenom,' ',getId,' ',getId2) as Patient;
    end if; 
end//
我从delimiter菜单中选择了
/
,并成功构建了模式

然后我说:

CALL FindTwins
在查询面板中。当我尝试运行查询时,收到错误消息:

MySQL的查询面板中不允许使用DDL和DML语句;只允许SELECT语句。将DDL和DML放在模式面板中

如果我不能打电话到医院,我怎么能看到手术的结果 查询面板


这是一个SQLFiddle错误。发件人:

不幸的是,我认为这句话目前在这方面不起作用 版本

好消息是,我们目前正在开发一个新版本。这个 新版本应该允许这没有问题,但不幸的是,我们 在发布之前需要更多的时间

这似乎适用于早期版本: