zoukankan      html  css  js  c++  java
  • Mysql之批处理

    【login.bat】

    mysql -h localhost -u root -p123456 < mysql.sql >mysql.out

    【mysql.sql】

    #select "display  all databases";
    #select "============================";
    show databases;
    select " ";

    #select "select database";
    #select "============================";
    use testdb;
    show tables;
    select " ";

    #select "============================";
    #check the table value
    select * from pet;
    select " ";


    #select "============================";
    #select dog's owner
    select * from pet where species = "dog";

    【mysql.out】

    Database
    information_schema
    mysql
    test
    testdb

     
    Tables_in_testdb
    event
    pet

     
    name owner species sex birth death
    Claws Gwen cat m 1994-03-17 NULL
    Buffy Harold dog f 1989-05-13 NULL
    Fang Benny dog m 1990-08-27 NULL
    Bowser Diane dog m 1979-08-31 1995-07-29
    Chirpy Gwen bird f 1998-09-11 NULL
    Whistler Gwen bird NULL 1989-08-31 1997-12-09
    Slim Benny snake m 1996-04-29 NULL
    Pufball Diane hamster f 1999-03-30 NULL

     
    name owner species sex birth death
    Buffy Harold dog f 1989-05-13 NULL
    Fang Benny dog m 1990-08-27 NULL
    Bowser Diane dog m 1979-08-31 1995-07-29

  • 相关阅读:
    设备驱动开发之缓冲区读写操作
    什么是80Plus
    INF Manufacturer Section
    C++编程获得某台机器的IP地址
    INF DestinationDirs Section
    importlib模块
    django的内置信号
    auth模块(登录验证)
    头像文件的预览
    powerDesiger 常用设置
  • 原文地址:https://www.cnblogs.com/allenblogs/p/2149716.html
Copyright © 2011-2022 走看看