1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| mysql> alter table score add evaluation char(20) default 'normal'; Query OK, 0 rows affected (0.02 sec) Records: 0 Duplicates: 0 Warnings: 0
mysql> insert into score values (1,'zhao',85.25,'excellent'),(2,'qian',75.80,'normal'),(3,'sun',92.40,'excellent'),(4,'li',59.00,'weak'); Query OK, 4 rows affected (0.04 sec) Records: 4 Duplicates: 0 Warnings: 0
mysql> create table info( -> name char(20) 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 '' at line 2 mysql> create table info( -> name char(20) not null, -> phone char(20), -> address char(20)); Query OK, 0 rows affected (0.08 sec)
mysql> insert into values('zhao',13199999999,'beijing'),('qian','13288888888','harbin'),('sun',13166666666,'shanghai'); 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 'values('zhao',13199999999,'beijing'),('qian','13288888888','harbin'),('sun',1316' at line 1 mysql> insert into info values('zhao',13199999999,'beijing'),('qian','13288888888','harbin'),('sun',13166666666,'shanghai'); Query OK, 3 rows affected (0.05 sec) Records: 3 Duplicates: 0 Warnings: 0
mysql> select * from info; +------+-------------+----------+ | name | phone | address | +------+-------------+----------+ | zhao | 13199999999 | beijing | | qian | 13288888888 | harbin | | sun | 13166666666 | shanghai | +------+-------------+----------+ 3 rows in set (0.00 sec)
|