mysql数据库很简单操作

时间:2014-06-17 18:17:46   收藏:0   阅读:233

进入linux系统

root   >/usr/bin/mysql -u root

mysql>show databases;                    #查看数据库

mysql>use  testtable;                        #testtable 为所要查看的库,应用数据库

mysql>show tables;                          #查看所有表

mysql>desc abc_table                      #查看表结构



mysql>create table abc(

        >id int not null primary key ,

        >`type` text null,

        >.....

        >..........);                                  #创建数据表


mysql>alter table abc add list varchare(50) no null;           #给现有表里添加字段


mysql>desc abc;                             #验证创建结果


mysql数据库很简单操作,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!