全部博文(320)
分类: Mysql/postgreSQL
2010-03-02 12:16:29
用MySQL创建数据库和数据库表 | ||||||
了解了一些最基本的操作命令后,我们再来学习如何创建一个数据库和数据库表。 | Database | +----------+ | mysql |
| test | +----------+ 3 rows in set (0.00 sec) -> birth DATE, birthaddr VARCHAR(20));
Query OK, 0 rows affected (0.00 sec) | Tables in menagerie | +---------------------+ | mytables
| +---------------------+ +-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| name | varchar(20) | YES | | NULL | | | sex | char(1)
| YES | | NULL | | | birth | date | YES | | NULL | |
| deathaddr | varchar(20) | YES | | NULL |
| +-------------+-------------+------+-----+---------+-------+
4 rows in set (0.00 sec) 6、 往表中加入记录 ′f′,′1977-07-07′,′china′); Query OK,
1 row affected (0.05 sec) |