程序设计实用案例选讲(袁卫华)mysql基本操作资料教程.pptVIP

  • 5
  • 0
  • 约2.14千字
  • 约 30页
  • 2018-11-17 发布于天津
  • 举报

程序设计实用案例选讲(袁卫华)mysql基本操作资料教程.ppt

程序设计实用案例选讲(袁卫华)mysql基本操作资料教程.ppt

MySQL基本操作 矫东魁 MySQL的基本命令 显示数据库列表。 show databases; 建库: create database 库名; 显示库中的数据表: use mysql; show tables; 建表: use 库名; create table 表名 (字段设定列表); 重命名表:alter table 表名 rename 新表名; MySQL的基本命令 删库和删表: drop database 库名; drop table 表名; 将表中记录清空: delete from 表名; 显示表中的记录: select * from 表名; 加主关键字的索引:alter table 表名 add primary key(字段); 增加字段:alter table 表名 add 字段 字段类型; 删除字段:alter table 表名 drop column 列名; 重命名列:alter table 表名 change 列名 新列名 integer; 插入数据:insert into table_name value (各字段数据); 更新表记录:update table_name set 字段=‘新值’ where condition; 1) 新建一个数据库,名为student_management。 使用命令:create database

文档评论(0)

1亿VIP精品文档

相关文档