-
SHOW {DATABASES | SCHEMAS} [LIKE 'pattern' | WHEREexpr]SHOW DATABASESlists the databases on the MySQL server host.SHOW SCHEMASis a synonym forSHOW DATABASES. TheLIKEclause, if present, indicates which database names to match. TheWHEREclause can be given to select rows using more general conditions 。具体见Manual -
CREATE {DATABASE | SCHEMA} [IF NOT EXISTS]db_name[create_specification...]create_specification: [DEFAULT] CHARACTER SETcharset_name| [DEFAULT] COLLATEcollation_nameCREATE DATABASEcreates a database with the given name. To use this statement, you need theCREATEprivilege for the database.CREATE SCHEMAis a synonym forCREATE DATABASE. (注意:我使用的是MySQL 5.1,使用小写字母报语法错误)。 -
USE
db_nameThe
USEstatement tells MySQL to use thedb_namedb_namedatabase as the default (current) database for subsequent statements. The database remains the default until the end of the session or anotherUSEstatement is issued:USE db1; SELECT COUNT(*) FROM mytable; # selects from db1.mytable USE db2; SELECT COUNT(*) FROM mytable; # selects from db2.mytable
-
CREATE TABLE Syntax(注意:我使用的是MySQL 5.1,使用小写字母报语法错误)
-
INSERT Syntax
-
MySQL的安装:关键在于Character Set选项应选择gb或gb2321
mysql-gui-tools-5.0-r12-win32.msi的安装:(MySQL图形化管理工具)
本文介绍了MySQL中常用的数据库操作命令,包括显示所有数据库、创建数据库、指定默认使用的数据库等。此外还涉及了创建表及插入数据的基本语法,并给出了MySQL安装过程中字符集设置的建议。
1849

被折叠的 条评论
为什么被折叠?



