本文介绍了语法错误: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在此位置输入无效
发布评论