创建数据库

Create Database If Not Exists MyDB Character Set UTF8

创建数据表:

Create Table If Not Exists `world`.`NewTable`(
`ID` Bigint(8) unsigned Primary key Auto_Increment,
`Name` text,
`Birthday` DateTime
)Engine InnoDB

结果:

MYSQL判断不存在时创建表或创建数据库

 

相关文章: