删除表中的信息: delete from youtable; 下面这条语句实现了从当地文件pet.in中向pet表中输入信息! load data local infile '/home/liuzhouping/sql/pet.in' into table pet lines terminated by '\n'; mysql创建表 create table stu (stu_id int not NULL,stu_name char(20) not NULL,stu_sex char(10) not NULL)engine=innodb; 插入一行 innodb是一个可靠的事务处理引擎,他不支持全文本搜索; insert into stu values ('1','xiaoxue','f'); alter table stu add stu_score char int; //增加一列 alter table stu drop stu_score;//删除stu_score字段 alter table stu modify stu_score bigint//改变列字段stu_score类型为bigint alter table stu change stu_score stu_mark int;#这条语句实现了改变字段名stu_score为stu_mark并将其类型改为int alter table stu change 删除特定的行
delete from stu where stu_name = 'name'; 更新时所用的命令:update delete; 删除表drop table stu; 重命名表 rename table stu to student; mysqladmin -u root -proot Var //显示服务器环境变量 mysqladmin -u root -proot ping //查看数据库是否在运行 存储引擎 MyISAM MyISAM是默认存储引擎。 InnoDB给MySQL提供了具有提交、回滚和崩溃恢复能力的事务安全存储引擎 InnoDB是为处理大量数据而设计的。 mysqlcheck -u root -proot -c -B mysql // 检查mysql数据库中所有的表 mysqldump -u root -proot -d ruanjian0701 stu > ./sql.sql //只保存mysql数据库中stu表的结构
|