当前位置:网站首页>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
边栏推荐
猜你喜欢
【Gazebo入门教程】第三讲 SDF文件的静/动态编程建模
发送post请求前台无法获取数据
商汤自研机械臂,首款产品是AI下棋机器人:还请郭晶晶作代言
BEVDet4D: Exploit Temporal Cues in Multi-camera 3D Object Detection Paper Notes
Basic knowledge of switches
“Oracle 封禁了我的账户”
高数_证明_弧微分公式
[JS Advanced] Creating sub-objects and replacing this_10 in ES5 standard specification
神了!阿里数据库专家纯手写了这份604页的Oracle+MySQL攻坚指南
接口自动化测试基础篇
随机推荐
Ethernet channel Ethernet channel
C#实现访问OPC UA服务器
2022-08-09: What does the following go code output?A: No, it will panic; B: Yes, it can run correctly; C: Not sure, see the voting result.package main import (“fmt“ “syn
Have you guys encountered this problem?MySQL 2.2 and 2.3-SNAPSHOT are like this, it seems to be
2012年下半年 系统架构设计师 下午试卷 II
领域驱动实践总结(基本理论总结与分析V+架构分析与代码设计+具体应用设计分析)
【POI 2008, BLO】割点
一种能让大型数据聚类快2000倍的方法,真不戳
R语言使用gt包和gtExtras包优雅地、漂亮地显示表格数据:gtExtras包的gt_highlight_rows函数高亮(highlight)表格中特定的数据行、配置高亮行的特定数据列数据加粗
Data product manager thing 2
Import other custom namespaces in C#
[target detection] small script: extract training set images and labels and update the index
Interface Automation Testing Basics
SQL学习(基础)
OpenStack-related commands that need to be recorded _ self-use
How to describe multiple paragraphs with different font settings in Open Office XML format
Existing in the rain of PFAS chemical poses a threat to the safety of drinking water
YTU 2295: KMP pattern match one (string)
[JS Advanced] Creating sub-objects and replacing this_10 in ES5 standard specification
I would like to ask the big guys, how to solve this error when cdc oracle initializes a 3 million table task running