I. References
Http://dev.mysql.com/doc/refman/5.1/zh/sql-syntax.html#create-table
Http://www.cnblogs.com/yunf/archive/2011/04/20/2022193.html
Http://www.blogjava.net/coderdream/archive/2007/08/17/137642.html
Ii. Create a table
Create [temporary] Table [if not exists] tbl_name [(create_definition,...)] [table_options] [select_statement] Or: Create [temporary] Table [if not exists] tbl_name [(] Like old_tbl_name [)];
For example:
Create Table players (playerno integer not null primary key, name char (15) not null, Brith date, sex char (1) not null check (sex in ('M ', 'F'), joined smallint not null check (joined> 1969), Stree char (50), phoneno char (13) not null)
Create Table T2 like players # their table structures are the same
1 Create Table Shop ( 2 ID Int Not Null Primary Key Auto_increment, 3 Name Varchar ( 10 ) Not Null , 4 Country Varchar ( 30 ) Not Null 5 ) Engine = InnoDB Default Charset = Utf8 auto_increment = 1
Iii. Advanced
To be continued ,,,,