用MySQL创建数据库和数据库表(新手必看).doc
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《用MySQL创建数据库和数据库表(新手必看).doc》由会员分享,可在线阅读,更多相关《用MySQL创建数据库和数据库表(新手必看).doc(4页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、【精品文档】如有侵权,请联系网站删除,仅供学习与交流用MySQL创建数据库和数据库表(新手必看).精品文档.用MySQL创建数据库和数据表:步骤:1、 使用show语句找出在服务器上当前存在什么数据库:mysqlshow databases;2、 创建一个数据库test:mysqlcreate database test;3、 选择你所创建的数据库:mysqluse test;4创建一个数据表:首先查看刚才创建的数据库中存在什么表:mysqlshow tables;(说明刚才创建的数据库中还没有数据库表)接着我们创建一个关于students的数据表:包括学生的学号(id),姓名(name),性
2、别(sex),年龄(age)。mysqlcreate table students(id int unsigned not null auto_increment primary key,name char(8) not null,sex char(4) not null,age tinyint unsigned not null,);解释:以 id int unsigned not null auto_increment primary key 行进行介绍:id 为列的名称;int 指定该列的类型为 int(取值范围为 -8388608到8388607), 在后面我们又用 unsigned
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- MySQL 创建 数据库 新手
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内