语法错误:WITH在此位置输入无效

编程入门 行业动态 更新时间:2024-10-27 06:26:21
本文介绍了语法错误:WITH在此位置输入无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

所以我有类似的要求

WITH customers_in_usa AS ( SELECT customerName, state FROM customers WHERE country = 'USA' ) SELECT customerName FROM customers_in_usa WHERE state = 'CA' ORDER BY customerName;

但是在编写时,我遇到了一个错误:在该位置输入无效"'错误图片.您能帮我理解这段代码有什么问题吗?

But when wrote it I caught an error: 'WITH is not valid input in this position' error_picture. Can you help me to understand what's wrong in this code?

推荐答案

WITH customers_in_usa AS目前是无效的MySQL代码. MySQL将来将在MySQL版本8中支持CTE.

WITH customers_in_usa AS is for now invalid MySQL code. MySQL will support CTE's in the future in MySQL version 8..

您可以重写您的SQL代码,这应该产生相同的结果.

You could rewrite your SQL code, that should give the same results.

SELECT customerName , state FROM customers WHERE country = 'USA' AND state = 'CA' ORDER BY customerName

更多推荐

语法错误:WITH在此位置输入无效

本文发布于:2023-05-26 19:29:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/265210.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:在此   位置   语法错误

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!