From 001e4e418b38bb191123ba471b54e126ffb0f848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A9=E9=9C=87=E6=B4=8B?= <11785166+hzyai77@user.noreply.gitee.com> Date: Wed, 22 Feb 2023 04:54:09 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=E9=9F=A9=E9=9C=87?= =?UTF-8?q?=E6=B4=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\351\237\251\351\234\207\346\264\213/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\351\237\251\351\234\207\346\264\213/.keep" diff --git "a/\351\237\251\351\234\207\346\264\213/.keep" "b/\351\237\251\351\234\207\346\264\213/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From db6200cbe50b1a4bccafbc3fb35c404a5e6a11a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A9=E9=9C=87=E6=B4=8B?= <11785166+hzyai77@user.noreply.gitee.com> Date: Wed, 22 Feb 2023 04:56:46 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E9=9F=A9=E9=9C=87=E6=B4=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 韩震洋 <11785166+hzyai77@user.noreply.gitee.com> --- .../\351\237\251\351\234\207\346\264\213.txt" | 489 ++++++++++++++++++ 1 file changed, 489 insertions(+) create mode 100644 "\351\237\251\351\234\207\346\264\213/\351\237\251\351\234\207\346\264\213.txt" diff --git "a/\351\237\251\351\234\207\346\264\213/\351\237\251\351\234\207\346\264\213.txt" "b/\351\237\251\351\234\207\346\264\213/\351\237\251\351\234\207\346\264\213.txt" new file mode 100644 index 0000000..b981c2f --- /dev/null +++ "b/\351\237\251\351\234\207\346\264\213/\351\237\251\351\234\207\346\264\213.txt" @@ -0,0 +1,489 @@ +mysql> show databases; ++--------------------+ +| Database | ++--------------------+ +| information_schema | +| mysql | +| performance_schema | +| sys | +| test | +| test01_market | +| test02_library | ++--------------------+ +7 rows in set (0.00 sec) + +mysql> select * from books; +ERROR 1046 (3D000): No database selected +mysql> use test02__library; +ERROR 1049 (42000): Unknown database 'test02__library' +mysql> use test02_library; +Database changed +mysql> select * from books; ++------+--------+---------+-------+---------+--------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+--------+---------+-------+---------+--------+-----+ +| 1 | qiqi | qi | 7 | 2020 | kunkun | 101 | ++------+--------+---------+-------+---------+--------+-----+ +1 row in set (0.00 sec) + +mysql> delete from books where b_id=5; +Query OK, 0 rows affected (0.00 sec) + +mysql> select * from books; ++------+--------+---------+-------+---------+--------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+--------+---------+-------+---------+--------+-----+ +| 1 | qiqi | qi | 7 | 2020 | kunkun | 101 | ++------+--------+---------+-------+---------+--------+-----+ +1 row in set (0.00 sec) + +mysql> delete from books ; +Query OK, 1 row affected (0.01 sec) + +mysql> select * from books; +Empty set (0.00 sec) + +mysql> desc books; ++---------+--------------+------+-----+---------+-------+ +| Field | Type | Null | Key | Default | Extra | ++---------+--------------+------+-----+---------+-------+ +| b_id | int(11) | NO | PRI | NULL | | +| b_name | varchar(50) | NO | | NULL | | +| authors | varchar(100) | NO | | NULL | | +| price | float | NO | | NULL | | +| pubdate | year(4) | NO | | NULL | | +| note | varchar(100) | YES | | NULL | | +| num | int(11) | NO | | NULL | | ++---------+--------------+------+-----+---------+-------+ +7 rows in set (0.00 sec) + +mysql> insert into books values (1,'tal of aaa','dickes',23,1995,'novel',11); +Query OK, 1 row affected (0.01 sec) + +mysql> select * from books; ++------+------------+---------+-------+---------+-------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+------------+---------+-------+---------+-------+-----+ +| 1 | tal of aaa | dickes | 23 | 1995 | novel | 11 | ++------+------------+---------+-------+---------+-------+-----+ +1 row in set (0.00 sec) + +mysql> insert into books values (2,'emmat','jane lura',35,1993,'joke',22); +Query OK, 1 row affected (0.01 sec) + +mysql> select * from books; ++------+------------+-----------+-------+---------+-------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+------------+-----------+-------+---------+-------+-----+ +| 1 | tal of aaa | dickes | 23 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 35 | 1993 | joke | 22 | ++------+------------+-----------+-------+---------+-------+-----+ +2 rows in set (0.00 sec) + +mysql> insert into books values(3,'story of jane','jane tim',40,2001,'novel',0); +Query OK, 1 row affected (0.01 sec) + +mysql> select * from books; ++------+---------------+-----------+-------+---------+-------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+---------------+-----------+-------+---------+-------+-----+ +| 1 | tal of aaa | dickes | 23 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 35 | 1993 | joke | 22 | +| 3 | story of jane | jane tim | 40 | 2001 | novel | 0 | ++------+---------------+-----------+-------+---------+-------+-----+ +3 rows in set (0.00 sec) + +mysql> insert into books values (4,'lovey day','george byron',20,2005,'novel',30); +Query OK, 1 row affected (0.01 sec) + +mysql> select * from books; ++------+---------------+--------------+-------+---------+-------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+---------------+--------------+-------+---------+-------+-----+ +| 1 | tal of aaa | dickes | 23 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 35 | 1993 | joke | 22 | +| 3 | story of jane | jane tim | 40 | 2001 | novel | 0 | +| 4 | lovey day | george byron | 20 | 2005 | novel | 30 | ++------+---------------+--------------+-------+---------+-------+-----+ +4 rows in set (0.00 sec) + +mysql> insert into books values(5,'old land','honore blade',30,2010,'law',0); +Query OK, 1 row affected (0.01 sec) + +mysql> select * from books; ++------+---------------+--------------+-------+---------+-------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+---------------+--------------+-------+---------+-------+-----+ +| 1 | tal of aaa | dickes | 23 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 35 | 1993 | joke | 22 | +| 3 | story of jane | jane tim | 40 | 2001 | novel | 0 | +| 4 | lovey day | george byron | 20 | 2005 | novel | 30 | +| 5 | old land | honore blade | 30 | 2010 | law | 0 | ++------+---------------+--------------+-------+---------+-------+-----+ +5 rows in set (0.00 sec) + +mysql> insert into books values(6,'the battle','upton sara',30,1999,'medicine',40); +Query OK, 1 row affected (0.01 sec) + +mysql> select * from books; ++------+---------------+--------------+-------+---------+----------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+---------------+--------------+-------+---------+----------+-----+ +| 1 | tal of aaa | dickes | 23 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 35 | 1993 | joke | 22 | +| 3 | story of jane | jane tim | 40 | 2001 | novel | 0 | +| 4 | lovey day | george byron | 20 | 2005 | novel | 30 | +| 5 | old land | honore blade | 30 | 2010 | law | 0 | +| 6 | the battle | upton sara | 30 | 1999 | medicine | 40 | ++------+---------------+--------------+-------+---------+----------+-----+ +6 rows in set (0.00 sec) + +mysql> insert into books values(7,'rose hood','richard haggard',28,2008,'cartoon',28); +Query OK, 1 row affected (0.00 sec) + +mysql> select * from books; ++------+---------------+-----------------+-------+---------+----------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+---------------+-----------------+-------+---------+----------+-----+ +| 1 | tal of aaa | dickes | 23 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 35 | 1993 | joke | 22 | +| 3 | story of jane | jane tim | 40 | 2001 | novel | 0 | +| 4 | lovey day | george byron | 20 | 2005 | novel | 30 | +| 5 | old land | honore blade | 30 | 2010 | law | 0 | +| 6 | the battle | upton sara | 30 | 1999 | medicine | 40 | +| 7 | rose hood | richard haggard | 28 | 2008 | cartoon | 28 | ++------+---------------+-----------------+-------+---------+----------+-----+ +7 rows in set (0.00 sec) + +mysql> update books set price = 28 where b_name = tal of aaa; +ERROR 1064 (42000): 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 'of aaa' at line 1 +mysql> update books set price = 28 where b_name = 'tal of aaa'; +Query OK, 1 row affected (0.01 sec) +Rows matched: 1 Changed: 1 Warnings: 0 + +mysql> select * from books; ++------+---------------+-----------------+-------+---------+----------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+---------------+-----------------+-------+---------+----------+-----+ +| 1 | tal of aaa | dickes | 28 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 35 | 1993 | joke | 22 | +| 3 | story of jane | jane tim | 40 | 2001 | novel | 0 | +| 4 | lovey day | george byron | 20 | 2005 | novel | 30 | +| 5 | old land | honore blade | 30 | 2010 | law | 0 | +| 6 | the battle | upton sara | 30 | 1999 | medicine | 40 | +| 7 | rose hood | richard haggard | 28 | 2008 | cartoon | 28 | ++------+---------------+-----------------+-------+---------+----------+-----+ +7 rows in set (0.00 sec) + +mysql> update books set price = 40 where b_name = 'emmat'; +Query OK, 1 row affected (0.01 sec) +Rows matched: 1 Changed: 1 Warnings: 0 + +mysql> select * from books; ++------+---------------+-----------------+-------+---------+----------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+---------------+-----------------+-------+---------+----------+-----+ +| 1 | tal of aaa | dickes | 28 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 40 | 1993 | joke | 22 | +| 3 | story of jane | jane tim | 40 | 2001 | novel | 0 | +| 4 | lovey day | george byron | 20 | 2005 | novel | 30 | +| 5 | old land | honore blade | 30 | 2010 | law | 0 | +| 6 | the battle | upton sara | 30 | 1999 | medicine | 40 | +| 7 | rose hood | richard haggard | 28 | 2008 | cartoon | 28 | ++------+---------------+-----------------+-------+---------+----------+-----+ +7 rows in set (0.00 sec) + +mysql> update books set price = 45 where b_name = 'story of jane'; +Query OK, 1 row affected (0.01 sec) +Rows matched: 1 Changed: 1 Warnings: 0 + +mysql> select * from books; ++------+---------------+-----------------+-------+---------+----------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+---------------+-----------------+-------+---------+----------+-----+ +| 1 | tal of aaa | dickes | 28 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 40 | 1993 | joke | 22 | +| 3 | story of jane | jane tim | 45 | 2001 | novel | 0 | +| 4 | lovey day | george byron | 20 | 2005 | novel | 30 | +| 5 | old land | honore blade | 30 | 2010 | law | 0 | +| 6 | the battle | upton sara | 30 | 1999 | medicine | 40 | +| 7 | rose hood | richard haggard | 28 | 2008 | cartoon | 28 | ++------+---------------+-----------------+-------+---------+----------+-----+ +7 rows in set (0.00 sec) + +mysql> update books set price = 25 where b_name = 'jane tim'; +Query OK, 0 rows affected (0.00 sec) +Rows matched: 0 Changed: 0 Warnings: 0 + +mysql> update books set price = 45 where b_name = 'jane tim'; +Query OK, 0 rows affected (0.00 sec) +Rows matched: 0 Changed: 0 Warnings: 0 + +mysql> select * from books; ++------+---------------+-----------------+-------+---------+----------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+---------------+-----------------+-------+---------+----------+-----+ +| 1 | tal of aaa | dickes | 28 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 40 | 1993 | joke | 22 | +| 3 | story of jane | jane tim | 45 | 2001 | novel | 0 | +| 4 | lovey day | george byron | 20 | 2005 | novel | 30 | +| 5 | old land | honore blade | 30 | 2010 | law | 0 | +| 6 | the battle | upton sara | 30 | 1999 | medicine | 40 | +| 7 | rose hood | richard haggard | 28 | 2008 | cartoon | 28 | ++------+---------------+-----------------+-------+---------+----------+-----+ +7 rows in set (0.00 sec) + +mysql> update books set price = 25 where name = 'georege byron'; +ERROR 1054 (42S22): Unknown column 'name' in 'where clause' +mysql> update books set price = 25 where b_name = 'georege byron'; +Query OK, 0 rows affected (0.00 sec) +Rows matched: 0 Changed: 0 Warnings: 0 + +mysql> update books set price = 35 where b_name = 'honore blade'; +Query OK, 0 rows affected (0.00 sec) +Rows matched: 0 Changed: 0 Warnings: 0 + +mysql> update books set prcie = 35 where b_name = 'upton sara'; +ERROR 1054 (42S22): Unknown column 'prcie' in 'field list' +mysql> update books set price = 35 where b_name = 'upton sara'; +Query OK, 0 rows affected (0.00 sec) +Rows matched: 0 Changed: 0 Warnings: 0 + +mysql> update books set price = 33 where b_name = 'richard haggard'; +Query OK, 0 rows affected (0.00 sec) +Rows matched: 0 Changed: 0 Warnings: 0 + +mysql> select * from books; ++------+---------------+-----------------+-------+---------+----------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+---------------+-----------------+-------+---------+----------+-----+ +| 1 | tal of aaa | dickes | 28 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 40 | 1993 | joke | 22 | +| 3 | story of jane | jane tim | 45 | 2001 | novel | 0 | +| 4 | lovey day | george byron | 20 | 2005 | novel | 30 | +| 5 | old land | honore blade | 30 | 2010 | law | 0 | +| 6 | the battle | upton sara | 30 | 1999 | medicine | 40 | +| 7 | rose hood | richard haggard | 28 | 2008 | cartoon | 28 | ++------+---------------+-----------------+-------+---------+----------+-----+ +7 rows in set (0.00 sec) + +mysql> update books set price = 25 where b_name = 'lovey day'; +Query OK, 1 row affected (0.01 sec) +Rows matched: 1 Changed: 1 Warnings: 0 + +mysql> select * from books; ++------+---------------+-----------------+-------+---------+----------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+---------------+-----------------+-------+---------+----------+-----+ +| 1 | tal of aaa | dickes | 28 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 40 | 1993 | joke | 22 | +| 3 | story of jane | jane tim | 45 | 2001 | novel | 0 | +| 4 | lovey day | george byron | 25 | 2005 | novel | 30 | +| 5 | old land | honore blade | 30 | 2010 | law | 0 | +| 6 | the battle | upton sara | 30 | 1999 | medicine | 40 | +| 7 | rose hood | richard haggard | 28 | 2008 | cartoon | 28 | ++------+---------------+-----------------+-------+---------+----------+-----+ +7 rows in set (0.00 sec) + +mysql> update books set price = 35 where name = 'old land' or name = 'the battle'; +ERROR 1054 (42S22): Unknown column 'name' in 'where clause' +mysql> +mysql> update books set price = 35 where b_name = 'old land' or b_name = 'the battle'; +Query OK, 2 rows affected (0.01 sec) +Rows matched: 2 Changed: 2 Warnings: 0 + +mysql> select * from books; ++------+---------------+-----------------+-------+---------+----------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+---------------+-----------------+-------+---------+----------+-----+ +| 1 | tal of aaa | dickes | 28 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 40 | 1993 | joke | 22 | +| 3 | story of jane | jane tim | 45 | 2001 | novel | 0 | +| 4 | lovey day | george byron | 25 | 2005 | novel | 30 | +| 5 | old land | honore blade | 35 | 2010 | law | 0 | +| 6 | the battle | upton sara | 35 | 1999 | medicine | 40 | +| 7 | rose hood | richard haggard | 28 | 2008 | cartoon | 28 | ++------+---------------+-----------------+-------+---------+----------+-----+ +7 rows in set (0.00 sec) + +mysql> update books set price = 33 where b_name = 'rose hood'; +Query OK, 1 row affected (0.01 sec) +Rows matched: 1 Changed: 1 Warnings: 0 + +mysql> select * from books; ++------+---------------+-----------------+-------+---------+----------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+---------------+-----------------+-------+---------+----------+-----+ +| 1 | tal of aaa | dickes | 28 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 40 | 1993 | joke | 22 | +| 3 | story of jane | jane tim | 45 | 2001 | novel | 0 | +| 4 | lovey day | george byron | 25 | 2005 | novel | 30 | +| 5 | old land | honore blade | 35 | 2010 | law | 0 | +| 6 | the battle | upton sara | 35 | 1999 | medicine | 40 | +| 7 | rose hood | richard haggard | 33 | 2008 | cartoon | 28 | ++------+---------------+-----------------+-------+---------+----------+-----+ +7 rows in set (0.00 sec) + +mysql> delete from books where num = 0; +Query OK, 2 rows affected (0.01 sec) + +mysql> select * from books; ++------+------------+-----------------+-------+---------+----------+-----+ +| b_id | b_name | authors | price | pubdate | note | num | ++------+------------+-----------------+-------+---------+----------+-----+ +| 1 | tal of aaa | dickes | 28 | 1995 | novel | 11 | +| 2 | emmat | jane lura | 40 | 1993 | joke | 22 | +| 4 | lovey day | george byron | 25 | 2005 | novel | 30 | +| 6 | the battle | upton sara | 35 | 1999 | medicine | 40 | +| 7 | rose hood | richard haggard | 33 | 2008 | cartoon | 28 | ++------+------------+-----------------+-------+---------+----------+-----+ +5 rows in set (0.00 sec) + +mysql> create database test03_bookstore varchar utf8; +ERROR 1064 (42000): 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 'varchar utf8' at line 1 +mysql> create database test03_bookstore charset utf8; +Query OK, 1 row affected (0.00 sec) + +mysql> show databases; ++--------------------+ +| Database | ++--------------------+ +| information_schema | +| mysql | +| performance_schema | +| sys | +| test | +| test01_market | +| test02_library | +| test03_bookstore | ++--------------------+ +8 rows in set (0.00 sec) + +mysql> use test03_bookstore; +Database changed +mysql> create table book( + -> id int(11) not null primary key); +Query OK, 0 rows affected (0.02 sec) + +mysql> desc talbe; +ERROR 1146 (42S02): Table 'test03_bookstore.talbe' doesn't exist +mysql> desc book; ++-------+---------+------+-----+---------+-------+ +| Field | Type | Null | Key | Default | Extra | ++-------+---------+------+-----+---------+-------+ +| id | int(11) | NO | PRI | NULL | | ++-------+---------+------+-----+---------+-------+ +1 row in set (0.00 sec) + +mysql> drop book; +ERROR 1064 (42000): 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 'book' at line 1 +mysql> drop table book; +Query OK, 0 rows affected (0.01 sec) + +mysql> create table book( + -> id int(11) not null primary key, + -> ; +ERROR 1064 (42000): 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 2 +mysql> create table book( + -> id int(11) not null primary key auto_increment, + -> title varchar(100) not null, + -> author varchar(100), + -> price double(11,2) not null, + -> sales int(11) not null, + -> stock int(11) not null, + -> img_path varchar(100) not null); +Query OK, 0 rows affected (0.01 sec) + +mysql> desc book; ++----------+--------------+------+-----+---------+----------------+ +| Field | Type | Null | Key | Default | Extra | ++----------+--------------+------+-----+---------+----------------+ +| id | int(11) | NO | PRI | NULL | auto_increment | +| title | varchar(100) | NO | | NULL | | +| author | varchar(100) | YES | | NULL | | +| price | double(11,2) | NO | | NULL | | +| sales | int(11) | NO | | NULL | | +| stock | int(11) | NO | | NULL | | +| img_path | varchar(100) | NO | | NULL | | ++----------+--------------+------+-----+---------+----------------+ +7 rows in set (0.00 sec) + +mysql> alter table author not null; +ERROR 1064 (42000): 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 'not null' at line 1 +mysql> alter table author add not null; +ERROR 1064 (42000): 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 'not null' at line 1 +mysql> alter table author modify varchar(100) not null; +ERROR 1064 (42000): 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 'varchar(100) not null' at line 1 +mysql> alter table book modify author varchar(100) ont null; +ERROR 1064 (42000): 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 'ont null' at line 1 +mysql> alter table book modify author varchar(100) not null; +Query OK, 0 rows affected (0.02 sec) +Records: 0 Duplicates: 0 Warnings: 0 + +mysql> desc table book;; +ERROR 1064 (42000): 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 'table book' at line 1 +ERROR: +No query specified + +mysql> desc book; ++----------+--------------+------+-----+---------+----------------+ +| Field | Type | Null | Key | Default | Extra | ++----------+--------------+------+-----+---------+----------------+ +| id | int(11) | NO | PRI | NULL | auto_increment | +| title | varchar(100) | NO | | NULL | | +| author | varchar(100) | NO | | NULL | | +| price | double(11,2) | NO | | NULL | | +| sales | int(11) | NO | | NULL | | +| stock | int(11) | NO | | NULL | | +| img_path | varchar(100) | NO | | NULL | | ++----------+--------------+------+-----+---------+----------------+ +7 rows in set (0.00 sec) + +mysql> insert into book values(1,'解忧杂货店','东野奎吾',27.20,102,98,'upload/books/解忧杂货店.jpg'); +Query OK, 1 row affected (0.00 sec) + +mysql> select * from book; ++----+------------+----------+-------+-------+-------+-----------------------------+ +| id | title | author | price | sales | stock | img_path | ++----+------------+----------+-------+-------+-------+-----------------------------+ +| 1 | 解忧杂货店 | 东野奎吾 | 27.20 | 102 | 98 | upload/books/解忧杂货店.jpg | ++----+------------+----------+-------+-------+-------+-----------------------------+ +1 row in set (0.00 sec) + +mysql> insert into book values(2,,‘边城','沈从文',23.00,102,98,'upload/books/边城.jpg'); + '> ; + '> insert into book values(2,,‘边城','沈从文',23.00,102,98,'upload/books/边城.jpg'); +ERROR 1064 (42000): 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 '‘边城','沈从文',23.00,102,98,'upload/books/边城.jpg'); +; +insert into bo' at line 1 +mysql> insert into book values(2,‘边城','沈从文',23.00,102,98,'upload/books/边城.jpg'); + '> ; + '> insert into book values(2,‘边城','沈从文',23.00,102,98,'upload/books/边城.jpg'); +ERROR 1064 (42000): 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 '','沈从文',23.00,102,98,'upload/books/边城.jpg'); +; +insert into book values' at line 1 +mysql> insert into book values (2,‘边城','沈从文',23.00,102,98,'upload/books/边城.jpg'); + '> insert into book values (2,'边城','沈从文',23.00,102,98,'upload/books/边城.jpg'); + '> insert into book values (2,'边城','沈从文',23.00,102,98,'upload/books/边城.jpg'); + '> insert into book values (2,'边城','沈从文',23.00,102,98,'upload/books/边城.jpg'); + '> ; + '> ' + -> ;; +ERROR 1064 (42000): 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 '','沈从文',23.00,102,98,'upload/books/边城.jpg'); +insert into book values (' at line 1 +ERROR: +No query specified + +mysql> insert into book values(2,'边城','沈从文',23.00,102,98,'upload/books/边城.jpg'); +Query OK, 1 row affected (0.01 sec) + +mysql> select * from book; ++----+------------+----------+-------+-------+-------+-----------------------------+ +| id | title | author | price | sales | stock | img_path | ++----+------------+----------+-------+-------+-------+-----------------------------+ +| 1 | 解忧杂货店 | 东野奎吾 | 27.20 | 102 | 98 | upload/books/解忧杂货店.jpg | +| 2 | 边城 | 沈从文 | 23.00 | 102 | 98 | upload/books/边城.jpg | ++----+------------+----------+-------+-------+-------+-----------------------------+ +2 rows in set (0.00 sec) + +mysql> \ No newline at end of file -- Gitee