SQL Commands

[ Create/Drop Database ]

SHOW CREATE DATABASE <dbname>;  -- to show the sql command used to create the db.

DROP DATABASE <dbname>;  -- to delete a database.

CREATE DATABASE <dbname> DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;   -- to create a database.

USE <dbname>;  -- to make a db default database for all the following sql command.

[ Create/Drop Table ]

SHOW CREATE TABLE <tablename>;  -- to show the sql command sued to create the table.

posted @ 2016-09-05 18:23  Eric.YAO  阅读(91)  评论(0)    收藏  举报