当前位置:网站首页>sql语句 异常 Err] 1064 – You have an error in your SQL syntax; check the manual that corresponds to your
sql语句 异常 Err] 1064 – You have an error in your SQL syntax; check the manual that corresponds to your
2022-08-10 13:44:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
在我们开发的工程中,有时候会报 [Err] 1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near —— 这种异常 不用多想,肯定是我们的sql语句出现问题,下面我只说我经常犯的一种错误。当然还有很多种错误,我们遇到再说。
这时候 我们不难发现 错误的原因是我们这里多了一个 ,号
有时候也会出现这种错误 [Err] 1054 – Unknown column ‘———-’ in ‘field list’
这时候是我们的字段写错了 我们会发现数据库中并没有这个字段 而是我们的字段写错了
下面为大家写上两个同级sql
select a.Attribute_Id as Attribute_Id,
a.Attribute_Name as Attribute_Name,
a.Attribute_Alias as Attribute_Alias,
a.Attribute_Unit as Attribute_Unit,
a.DeviceType_Id as DeviceType_Id,
a.SortCode as SortCode,
a.UpdateTime as UpdateTime,
a.isdel as isDel
from zz_deviceattribute as a
where Attribute_Id in(
select Attribute_Id from ZZ_DeviceAttributeRelation
where Device_Id = '05871a37-a242-40f9-bbea-33bdea7009d5') select distinct
a.Attribute_Id as Attribute_Id,
a.Attribute_Name as Attribute_Name,
a.Attribute_Alias as Attribute_Alias,
a.Attribute_Unit as Attribute_Unit,
a.DeviceType_Id as DeviceType_Id,
a.SortCode as SortCode,
a.UpdateTime as UpdateTime,
a.isdel as isDel
from ZZ_DeviceAttributeRelation as b
inner join zz_deviceattribute as a
on a.Attribute_Id = b.Attribute_Id
where b.Device_Id = '05871a37-a242-40f9-bbea-33bdea7009d5'
and a.isDel ='0'
order by a.SortCode发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/130032.html原文链接:https://javaforall.cn
边栏推荐
- Network Saboteur
- leetcode 739. Daily Temperatures Daily Temperatures (Moderate)
- 递归递推之递归的函数
- Fragment-hide and show
- 系统架构系列文章三--解决传统企业核心系统的性能问题
- leetcode 739. Daily Temperatures 每日温度(中等)
- R语言实战应用案例:论文篇(一)-特殊柱形图绘制
- Data product manager thing 2
- Code Casual Recording Notes_Dynamic Programming_70 Climbing Stairs
- PHP 判断文件是否有内容,没有内容则复制另一个文件写入
猜你喜欢

laravel 抛错给钉钉

AWS 安全基础知识

1W字详解线程本地存储 ThreadLocal

【量化交易行情不够快?】一文搞定通过Win10 wsl2 +Ubuntu+redis+pickle实现股票行情极速读写

laravel throws the error to Dingding
![[Gazebo Introductory Tutorial] Lecture 3 Static/Dynamic Programming Modeling of SDF Files](/img/ec/87566763daf7faa3769ee186f93ee0.jpg)
[Gazebo Introductory Tutorial] Lecture 3 Static/Dynamic Programming Modeling of SDF Files

这一次,话筒给你:向自由软件之父斯托曼 提问啦!

一个 CRM One Order Application log 的单元测试报表

2022年五大云虚拟化趋势

高数_证明_曲率公式
随机推荐
【POI 2008, BLO】Cut Point
2012年下半年 系统架构设计师 下午试卷 II
[Study Notes] Persistence of Redis
Using data intelligence, Amazon cloud technology helps companies build endogenous brand growth
[JS Advanced] Creating sub-objects and replacing this_10 in ES5 standard specification
leetcode 739. Daily Temperatures 每日温度(中等)
高数_证明_曲率公式
接口自动化测试基础篇
2022-08-09:以下go语言代码输出什么?A:否,会 panic;B:是,能正确运行;C:不清楚,看投票结果。 package main import ( “fmt“ “syn
Fragment的show和hide
CodeForces-834C
商汤自研机械臂,首款产品是AI下棋机器人:还请郭晶晶作代言
Redis上云迁移实践
How does IT Xiaobai learn PHP systematically
C#实现访问OPC UA服务器
22!Beijing Changping District notified catering service enterprises with food safety problems
山水的高度
发送post请求前台无法获取数据
作业
【剑指offer】---数组中的重复数字