yuelun_zs 2018-09-12 07:25 采纳率: 66.7%
浏览 876

idea中的查询语法问题

问题描述
insert into orderfield(a,b) values select order_num ,order_time from c_yqwx_order; 以上代码在navicat中运行成功,在idea中运行报错,提示为:check the manual that corresponds to your MySQL server version for the right syntax 。
把sql标签insert改为select,报错提示为 :net.sf.jsqlparser.statement.insert.Insert
can no cast into net.sf.jsqlparser.statement.select.Select
功能描述
一条sql完成 从表A中查出两列数据,转存储到表B的两列中,

想请教各位,这个sql需要怎么改改,或者我需要使用那个特定的数据库方言?

  • 写回答

3条回答 默认 最新

  • 全栈极简 博客专家认证 2018-09-12 07:30
    关注

    insert into orderfield(a,b) values (select order_num ,order_time from c_yqwx_order)

    加个括号试试

    评论

报告相同问题?

悬赏问题

  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法
  • ¥15 很想要一个很好的答案或提示
  • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
  • ¥15 怀疑手机被监控,请问怎么解决和防止
  • ¥15 Qt下使用tcp获取数据的详细操作
  • ¥15 idea右下角设置编码是灰色的
  • ¥15 全志H618ROM新增分区