mySQL 怎么建库的代码和sql有什么不同请帮忙把代码给一下。。

解决方案 »

  1.   

    CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name
        [create_specification ...]create_specification:
        [DEFAULT] CHARACTER SET charset_name
      | [DEFAULT] COLLATE collation_name基本类似
      

  2.   

    CREATE DATABASE statement creates only a directory under the MySQL data directory and the db.opt file.
      

  3.   

    [code=BatchFile]# mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 1 to server version: 3.23.58Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> CREATE DATABASE animals;
    Query OK, 1 row affected (0.00 sec)
    mysql>[/code]