mysql> SHOW TABLES;
+--------------+
| Tables_in_fx |
+--------------+
| fx1 |
+--------------+
1 row in set (0.02 sec) 我的数据表 fx1
+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| name | varchar(20) | YES | | NULL | |
| SEX | char(1) | YES | | NULL | |
+-------+-------------+------+-----+---------+-------+mysql> INSERT INTO fx1
-> VALUES('FXX','F');
Query OK, 1 row affected (0.00 sec)
但是 这是怎么回事 mysql> SELECT FROM * fx1;
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 'FROM
* fx1' at line 1
+--------------+
| Tables_in_fx |
+--------------+
| fx1 |
+--------------+
1 row in set (0.02 sec) 我的数据表 fx1
+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| name | varchar(20) | YES | | NULL | |
| SEX | char(1) | YES | | NULL | |
+-------+-------------+------+-----+---------+-------+mysql> INSERT INTO fx1
-> VALUES('FXX','F');
Query OK, 1 row affected (0.00 sec)
但是 这是怎么回事 mysql> SELECT FROM * fx1;
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 'FROM
* fx1' at line 1
+------+------+
| name | SEX |
+------+------+
| fxxx | y |
| wwww | f |
| FXX | F |
+------+------+
3 rows in set (0.03 sec)mysql> SELECT *FROM fx1';
'>刚无意在后面 加了个 ‘ 号 之后 就一直 '> 这个’号 是什么意思
mysql> Ready for new command.
-> Waiting for next line of multiple-line command.
'> Waiting for next line, waiting for completion of a string that began with a single quote (“'”).
"> Waiting for next line, waiting for completion of a string that began with a double quote (“"”).
`> Waiting for next line, waiting for completion of an identifier that began with a backtick (“`”).
/*> Waiting for next line, waiting for completion of a comment that began with /*.
SELECT * FROM fx1;
我也初学mysql 找个教程一边看 一边实践