当前位置: 首页 > article >正文

Navicat 导出表结构后运行查询失败ERROR 1064 (42000): You have an error in your SQL syntax;

本文主要介绍了在使用 Navicat 导出 MySQL 表后新建查询时出现报错的问题及解决方案。
在这里插入图片描述

一、问题描述

Navicat导出MySql中的表,在新建数据库新建查询时通常会报错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 ……

在这里插入图片描述

在这里插入图片描述

二、问题分析

网上有很多解决方案,例如语法上的错误,在MySQL中,为了区分MySQL的关键字与普通字符,MySQL引入了一个反引号,列的注释不能用反引号。又或者是没用用户权限的问题。

这些都试过了,但我正常运行导出的sql文件都没问题,而用Navicat 新建查询处理就不行,原因是这里的查询只能处理简单操作,直接执行sql需要在Navicat的命令列界面中。

三、解决方案

在这里插入图片描述
将sql文件中的内容复制进去,回车执行
在这里插入图片描述

执行成功,没有错误
在这里插入图片描述


MySQL defined
MySQL is an open source relational database management system. As with other relational databases, MySQL stores data in tables made up of rows and columns. Users can define, manipulate, control, and query data using Structured Query Language, more commonly known as SQL. Since MySQL is open source, it includes numerous features developed in close cooperation with users for more than 25 years.

MySQL software is open source
MySQL is open source, which means that it is available to use free of cost under the GNU General Public License terms. This also means that anyone is free to modify the source code of the software for their own use. This has led to the forking of MySQL to other variants of the database like MariaDB and Percona Server for MySQL MySQL are also available under other licenses for commercial use.

Relational database
MySQL belongs to a category of databases, called relational database management systems (RDBMS). A relational database is a collection of information that organizes data in predefined relationships where data is stored in one or more tables (or “relations”) of columns and rows, making it easy to see and understand how different data structures relate to each other. Relationships are a logical connection between different tables, established on the basis of interaction among these tables.

History
MySQL was created as an extension to the commercial programming language, SQL, which was based on the relational model described in Edgar F. Codd’s paper. The Swedish company MySQL AB, founded by David Axmark, Allan Larsson, and Michael Widenius, developed and released MySQL in 1995. The name “MySQL” is a combination of Michael Wildenius’ daughter’s name “My” and “SQL,” which refers to Structure Query Language (SQL). Sun Microsystems acquired MySQL AB in 2008. MySQL is currently under the ownership of Oracle Corporation after the acquisition of Sun Microsystems in 2010.

MySQL was originally developed in C and C++ programming languages and has enjoyed lots of popularity for its many versions over the years because of its availability on many open source and proprietary operating systems. The latest version of the database, MySQL version 8.0, was released in 2018.


http://www.kler.cn/a/512081.html

相关文章:

  • 线程池遇到未处理的异常会崩溃吗?
  • PHP:从入门到进阶的全方位指南
  • 如何使用MaskerLogger防止敏感数据发生泄露
  • SparkSQL函数
  • 有限元分析学习——Anasys Workbanch第一阶段笔记(13)网格单元分类、物理场与自由度概念
  • 调试Hadoop源代码
  • Vue3轮播图左右联动
  • Astropay之坑
  • IJCAI-2024 | 具身导航的花样Prompts!VLN-MP:利用多模态Prompts增强视觉语言导航能力
  • 【TVM教程】为 ARM CPU 自动调优卷积网络
  • WPF MVVM 模式如何监听IsVisibleChanged 事件
  • AI预测福彩3D采取888=3策略+和值012路+胆码预测2025年1月20日新模型预测第1弹
  • OSCP - Proving Grounds - BullyBox
  • 基于SpringBoot的个人博客系统的设计与实现(源码+SQL脚本+LW+部署讲解等)
  • 单行文本框控件
  • (4)Vue 3 + Vite + Axios + Pinia + Tailwind CSS搭建一个基础框架
  • STL—stack与queue
  • 区块链 智能合约安全 | 回滚攻击
  • 【QT】 控件 -- 按钮类(Button)
  • 图解Git——分布式Git《Pro Git》
  • Java虚拟机相关八股一>jvm分区,类加载(双亲委派模型),GC
  • 2025.1.16——四、get_post 传参方式
  • VIVADO ILA IP进阶使用之任意设置ILA的采样频率
  • 人形机器人将制造iPhone!
  • 在Spring Boot中使用SeeEmitter类实现EventStream流式编程将实时事件推送至客户端
  • 后端架构学习笔记