当前位置:网站首页>The problem of the result set returned by MySQL stored procedure
The problem of the result set returned by MySQL stored procedure
2022-07-22 17:57:00 【CSDN Q & A】
mysql The problem of the result set returned by the stored procedure
DELIMITER $$USE `crj`$$DROP PROCEDURE IF EXISTS `crj_duty`$$CREATE DEFINER=`root`@`%` PROCEDURE `crj_duty`()BEGINSET @EE='';SELECT @EE :=CONCAT(@EE,'max(if(duty_type= \'',duty_type,'\',duty_name,NULL)) as ',duty_type, ',') AS aa FROM (SELECT DISTINCT duty_type FROM sks_duty_info) A ;SET @QQ = CONCAT('select ifnull(c.parent_id,\'TOTAL\')as parent_id,',@EE,' b.duty_time from sks_duty_info c,sks_duty_days b WHERE c.parent_id=b.id group by parent_id order by b.duty_time asc');-- SELECT @QQ;PREPARE zbb FROM @QQ;EXECUTE zbb;DEALLOCATE PREPARE zbb;END$$DELIMITER ;** Execution results **** Expected results ** I just want the second result set , What should I do with ?
边栏推荐
- 【开发者必看】【push kit】推送服务服务典型问题合集1
- Bigder:38/100 一个误操作的问题解决了
- 【HMS core】【FAQ】【Account Kit】典型问题集2
- Prepare for the attack and defense drill. Here is a security deployment map of Tencent!
- Bigder:40/100 how to organize a use case review
- [how to optimize her] teach you how to locate unreasonable SQL? And optimize her~~~
- Niuke brush SQL
- Critical path problem
- 分布式(一)分布式系统,BASE,CAP是何方神圣?
- Abnormal understanding and learning
猜你喜欢
Logistic regression (formula derivation +numpy Implementation)
【HMS core】【FAQ】【Account Kit】典型问题合集1
Bigder:37/100 a misoperation
深度学习(二)一文带你了解神经网络,激活函数
异常的理解学习
MySQL 增删改查(進階)
How to make an appointment while watching the panorama? Here comes the VR catering system tutorial
Mongodb query statement >, & gt;=、& lt;、& lt;=、=、!=、 In, not in usage introduction
【微服务~远程调用】整合RestTemplate、WebClient、Feign
MySQL 增删改查(进阶)
随机推荐
Allegro如何导入高清Logo、二维码、防静电标识等图片以及汉字
impdp content=data_only 当存在记录时可否选择跳过还是覆盖选项?
方法论(一):如何快速学习一门编程语言
【HMS core】【Health Kit】【FAQ】数据订阅功能问题合集
Virtual machine performance test scheme
Physical layer of network
C language branch structure and loop structure (1)
Android interview question: what is the difference between pendingintent and intent?
Niuke brush SQL
Take CRM system as an example to explain data analysis (importance introduction and analysis method)
Bigder: common business terms in 36/100 report testing
Talking about DOM objects in depth, use four versions of demoplus to break the history.state header (more)
【单片机仿真项目】外部中断0和1分别通过不同触发方式控制二极管
Zabbix5.0.8-ODBC监控oracle11g
ORACLE语句调整
【OpenCV入门实战】利用电脑前置摄像头进行人脸检测
web3分享
UART communication experiment (query mode)
Logistic regression (formula derivation +numpy Implementation)
Guys, when Flink SQL job submits a job to yarn, it reports an SQL error that cannot be executed. If it is executed locally, it does not report an error. The server