syntax error at or near “.“

2023-05-16

### SQL: select t.id,t.name,t.sex,t.age t.address,t.phone from user where id = 1
### Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near "."
  Position: 34
; bad SQL grammar [];nested exception is org.postgresql.util.PSQLException: ERROR: syntax error at or near "."
  Position: 34

一、学习如何根据错误信息定位sql问题出在哪儿

思路:

1. ERROR: syntax error at or near “.” Position: 34
这句话的意思是,问题出现在第34个字符附近。

2. 查看sql

select t.id,t.name,t.sex,t.age t.address,t.phone from user where id = 1

34个字符是t.address中的特殊符号.,检查这个.特殊符号的附件是否有错误写法。
仔细观察,发现t.age后面没写逗号,导致语法错误

二、错误sql解决

正确的sql:

select t.id,t.name,t.sex,t.age,t.address,t.phone from user where id = 1

错误的sql:

select t.id,t.name,t.sex,t.age t.address,t.phone from user where id = 1

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

syntax error at or near “.“ 的相关文章

随机推荐

  • RTP分析

    参考 RTP xff08 A Transport Protocol for Real Time Applications 实时传输协议 xff0c rfc3550 xff09 RTP Payload Format for H 264 Vid
  • VS链接器工具错误 LNK2019:无法解析的外部符号

    常见的问题 以下是一些导致 LNK2019 的常见问题 xff1a 未链接的对象文件或包含符号定义的库 在 Visual Studio 中 xff0c 验证包含定义源代码文件是生成 xff0c 分别链接为项目的一部分 在命令行中 xff0c
  • FFmpeg合并视频流与音频流

    mux h ifndef MUX H define MUX H ifdef cplusplus extern 34 C 34 endif include 34 common h 34 include 34 encode h 34 typed
  • 解决电脑同时使用有线网上内网,无线网上外网的冲突

    由于内网有网络限制 xff08 限制娱乐等 xff09 xff0c 所以肯定要用外网 xff08 无线网卡 xff09 但是有的网站只能用内网访问 xff0c 比如gitlab xff0c oa等 我电脑刚开始连接了wifi后上不了gitl
  • Python斗鱼直播间自动发弹幕脚本

    工具 xff1a Python xff0c Chrome浏览器 因为不会用短信验证码登录 xff0c 所以使用QQ帐号登录 xff0c 必须要斗鱼帐号绑定QQ号 难点主要是帧的切换 查找元素可以通过chrome浏览器鼠标指向该元素 xff0
  • Qt+FFmpeg录屏录音

    欢迎加QQ群309798848交流C C 43 43 linux Qt 音视频 OpenCV 源码 xff1a Qt 43 FFmpeg录屏录音 NanaRecorder 之前的录屏项目ScreenCapture存在音视频同步问题 xff0
  • Qt源码分析(一)

    欢迎加QQ群309798848交流C C 43 43 linux Qt 音视频 OpenCV 源码面前 xff0c 了无秘密 阅读源码能帮助我们理解实现原理 xff0c 然后更灵活的运用 接下来我用VS2015调试Qt5 9源码 首先提一下
  • python实现批量提取图片中文字的小工具

    要实现批量提取图片中的文字 xff0c 我们可以使用Python的pytesseract和Pillow库 pytesseract是一个OCR xff08 Optical Character Recognition xff0c 光学字符识别
  • 在虚拟机与wsl中编译内核,并启用kasan

    linux内核编译 虚拟机编译自己的内核WSL编译自己的内核测试kasan 想学习一下kasan的相关配置 xff0c 但kasan是内核中的相关配置 xff0c 开启得编译内核 xff0c 本文使用虚拟机与wsl两种方式来编译内核启动ka
  • mac时间机器删除旧备份

    查 span class token function sudo span tmutil listlocalsnapshots 删除 span class token function sudo span tmutil deleteloca
  • Linux的ssh服务

    Linux中真机与虚拟机的连接 1 先修改虚拟机的IP xff0c 在虚拟机中输入命令 xff1a nm connection editor 2 选中已存在的System eth0 xff0c 选择Delete 然后点击Add xff0c
  • 51单片机——控制步进电机加速、减速及反转

    加速 xff1a include lt reg52 h gt define uchar unsigned char define uint unsigned int define MotorData P1 uchar phasecw 4 6
  • 【安装教程】——Linux安装opencv

    安装教程 Linux安装opencv 一 安装相关软件包二 获取Source三 安装OpenCV 未完待续 一 安装相关软件包 安装相关软件包 打开终端 xff0c 安装以下软件包 sudo apt install build span c
  • 请教:linux下的/opt目录是做什么用的?

    请教 linux下的 opt目录是做什么用的 蛋疼YMG 浏览 4934 次 发布于2014 10 24 13 35 荒漠探险 答题闯关 好礼连连 最佳答案 opt 主机额外安装软件所摆放的目录 默认是空的 一般安装软件的时候 xff0c
  • kali里装java

    1 下载最新的JAVA JDK jdk 8u91 linux x64 2 解压缩文件并移动至 opt tar xzvf jdk 8u91 linux x64 tar gz mv jdk1 8 0 91 opt cd opt jdk1 8 0
  • ffmpeg--tcp

    TCP代码分析 xff1a include 34 avformat h 34 include 34 libavutil avassert h 34 include 34 libavutil parseutils h 34 include 3
  • GO调用ffmpeg动态库

    package main cgo CFLAGS I usr local ffmpeg include cgo LDFLAGS L usr local ffmpeg lib lavformat include 34 libavformat a
  • ftp上传文件时出现 550 Permission denied,不是用户权限问题

    查了半天 xff0c 发现是因为服务器已经有同名的文件了 xff0c 所以无法上传 xff0c 上传文件名改成不重复的就可以了
  • Ubuntu16.04解决登录闪退问题

    Ubuntu16 04解决登录闪退问题 夏哈哈 64 64 2020 07 21 08 42 46 637 收藏 1 分类专栏 xff1a 程序开发 Ubuntu装机 文章标签 xff1a 深度学习 版权 问题 xff1a Ubuntu16
  • syntax error at or near “.“

    SQL select t id t name t sex t age t address t phone from user where id 61 1 Cause org postgresql util PSQLException ERR