![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MySQL
svygh123
问题还没解决的,可以私信,解决了请采纳一下,谢谢
展开
-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL
MySQL报语法错误:You have an error in your SQL syntax;原创 2023-01-15 12:52:40 · 516 阅读 · 0 评论 -
几大数据库常用语句
H2:-- 测试版本: 1.4.193create table a_tb(id varchar(32));drop table if exists a_tb;MSSQL:-- 测试版本: SQLServer 2008R2create table a_tb(id varchar(32));if object_id(N'dbo.a_tb', N'U') is not null...原创 2019-12-10 22:11:45 · 149 阅读 · 0 评论 -
MySQL Workbench Failed to Connect to MySQL at 127.0.0.1:3306 with user root Bad handshake
安装包:mysql-workbench-community-8.0.18-winx64.msi版本号:MySQL Workbench 8.0 CE连接提示:尝试过方法1.localhost和::1都不行2.查询host是否在用户下,存在->无效3.在my.ini里的[mysqld]下加bind-address = 127.0.0.1也无效4.FLUS...原创 2019-12-06 11:41:18 · 12109 阅读 · 0 评论 -
SQLServer left join 出现比左表多的数据
create table a( id int, name varchar(100))create table b( id int, name varchar(100))insert into a(id,name) values(1,'a');insert into b(id,name) values(1,'a');insert into b(id,name) values(...原创 2019-12-05 17:54:16 · 1388 阅读 · 0 评论 -
MySQL存储过程中游标使用
在使用游标的时候,使用LOOP没有响应,后找到使用REPEAT实现,以下是代码:建表语句DROP table IF EXISTS test_table;create table test_table(id varchar(40));insert into test_table(id) values('a001');select * from test_table;错误代码...原创 2019-11-25 20:04:36 · 185 阅读 · 0 评论 -
#1064 - You have an error in your SQL syntax; version for the right syntax to use near '' at line
#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 '' at line 33初次写MySQL的存储过程的时候,以为和其他数据库的存储过程一样,先写完了sql,再...原创 2019-11-22 23:31:25 · 933 阅读 · 0 评论 -
MySQL insert not exists插入唯一数据
INSERT INTO table_name (id, name, age)SELECT * FROM (SELECT '1000', 'ndh', 32) AS tmpWHERE NOT EXISTS ( SELECT 1 FROM table_name WHERE id = '1000')注意: tmp里的字段不能重复,如果重复会报错,需要用as来指定别名以免重复...原创 2019-11-19 11:39:01 · 1830 阅读 · 0 评论