YESNULLexam_scoreti
yi
t4YESNULL4rowsi
set000sec
i
serti
toperso
alvalues001
etseek1983031595i
serti
toperso
alvalues002heihei1982022490i
serti
toperso
alvalues003gogo1985052185i
serti
toperso
alvalues004haha1984022584i
serti
toperso
alvalues005li
li
1982042885i
serti
toperso
alvalues006xi
xi
1985031575
mysqlselectfromperso
al
fmember_
o
amebirthdayexam_score001
etseek1983031595002heihei1982022490003gogo1985052185004haha1984022584005li
li
1982042885006xi
xi
1985031575
修改数据库表:要求在birthday这后增加一个为height的字段数据类型为ti
yi
t将字段exam_score改名为scores,数据类型不变altertableperso
aladdcolum
heightti
yi
tafterbirthdaycha
gecolum
exam_scorescoresti
yi
t
mysqlselectfromperso
almember_
o
amebirthdayheightscores001
etseek19830315NULL95002heihei19820224NULL90003gogo19850521NULL85004haha19840225NULL84
f005li
li
19820428NULL85006xi
xi
19850315NULL75
给表中插入数据:updateperso
alsetscores955where
ame
etseekselectscoresfromperso
alwhere
ame
etseekscores100
删除表名字为gogo所有的信息中的的deletefromperso
alwhere
amegogo
册除数据库中的表mysqldroptableifexistsperso
al
三,数据库的导入与导出导出:使用selecti
tooutfilefile
ame语句使用mysqldump实用程序使用selecti
tooutfilefile
ame语句
f1只能处理单个表,输出文件只有数据,没有表结构我们要将office其中有一个表为perso
al现在要把perso
al卸成文本文件outtxtuseofficeselectfromperso
ali
tooutfileouttxt可以看在varlibmysqloffice目录下有outtxtselectfromperso
ali
tooutfileouttxt可以看在outtxt在varlibmysql目录下用outtxt
2使用mysqldump实用程序可以轻松处理多个表cdvarlibmysql导出建立相关表的建表命令和插入指令mysqldumpbbsbbssql将数据库bbs导入到bbssql中
如果要将bbssql导入数据库可以使用mysqlcreatedatabasebbstest先建立一个名为office的数据库mysqlbbstestbbssql这个r