gpt4 book ai didi

mysql - mysql存储过程无法识别的数据类型错误

转载 作者:行者123 更新时间:2023-11-28 23:33:31 25 4
gpt4 key购买 nike

我正在尝试运行此查询,但我一直在 C.id 附近收到无法识别的数据类型。我做错了什么?

CREATE PROCEDURE `proc`
BEGIN
CREATE TABLE
temp_table
AS (
SELECT UNIQUE(C.id) FROM table1AS C
INNER JOIN table2 AS CA ON CA.college_id in (8192)
INNER JOIN table3 AS CS ON CS.skill_id in (2744)
)

select * from temp_table

END

谢谢。

最佳答案

CREATE PROCEDURE `proc`()
BEGIN
drop temporary table if exists temp_table;
CREATE temporary TABLE temp_table
AS (
SELECT distinct(C.id) FROM table1 AS C
INNER JOIN table2 AS CA ON CA.college_id in (8192)
INNER JOIN table3 AS CS ON CS.skill_id in (2744)
);

select * from temp_table;

END

关于mysql - mysql存储过程无法识别的数据类型错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36548364/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com