- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我将以下内容放入 sqlfiddle 的架构面板中:
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//
我从分隔符菜单中选择了//
,并成功构建了架构。
然后我把:
CALL FindTwins
在查询面板中。当我尝试运行查询时,收到错误消息:
DDL and DML statements are not allowed in the query panel for MySQL; only SELECT statements are allowed. Put DDL and DML in the schema panel.
如果我不能在查询面板?
最佳答案
这是一个 SQLFiddle 错误。来自 https://github.com/zzzprojects/sqlfiddle3/issues/5 :
Unfortunately, I don't think this statement currently work in this version.
The good news is that we are currently working on a new version. The new version should allow this without a problem but unfortunately, we need more time before releasing it.
这似乎适用于早期版本:Execute triggers stored procedures on SqlFiddle. Mysql .
关于mysql - 如何在sqlfiddle调用存储过程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56844585/
我是一名优秀的程序员,十分优秀!