mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
mysql> create database kylin;
Query OK, 1 row affected (0.00 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| kylin |
| mysql |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.00 sec)
mysql> use kylin;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> Create table student(Sid int primary key,Sname varchar(20) not null,Sex char(1),Brithdate date );
Query OK, 0 rows affected (0.06 sec)
mysql> show tables;
+-----------------+
| Tables_in_kylin |
+-----------------+
| student |
+-----------------+
1 row in set (0.00 sec)
mysql> select * from student;
Empty set (0.00 sec)
mysql> insert into student(Sid,Sname,Sex,Brithdate) values(1,'youth',1,'1999-4-15');
Query OK, 1 row affected (0.00 sec)
mysql> select * from student;
+-----+-------+------+------------+
| Sid | Sname | Sex | Brithdate |
+-----+-------+------+------------+
| 1 | youth | 1 | 1999-04-15 |
+-----+-------+------+------------+
1 row in set (0.00 sec)
mysql> show tables;
+-----------------+
| Tables_in_kylin |
+-----------------+
| student |
+-----------------+
1 row in set (0.00 sec)
mysql> drop table student;
Query OK, 0 rows affected (0.01 sec)
mysql> show tables;
Empty set (0.00 sec)
mysql> drop database kylin;
Query OK, 0 rows affected (0.01 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
添加我为好友,拉您入交流群!
请使用微信扫一扫!