Home >Database >Mysql Tutorial >MySQL中多表操作和批处理方法(4)_MySQL

MySQL中多表操作和批处理方法(4)_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:59:06852browse

   6、数据库的删除:

  mysql> drop database 数据库名;

  小心使用。

  7、数据库的备份:

  退回到DOS:


  mysql> quitd:mysqlbin


  使用如下命令对数据库abccs进行备份:


  mysqldump --opt abccs>abccs.dbb


  abccs.dbb就是你的数据库abccs的备份文件。

  8、用批处理方式使用MySQL:

  首先建立一个批处理文件mytest.sql,内容如下:


  use abccs; select * from mytable; select name,sex from mytable where name=′abccs′;


  在DOS下运行如下命令:


  d:mysqlbin mysql


  在屏幕上会显示执行结果。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn