欢迎来到我的的博客园,祝大家学有所成,早点实现自己的人生理想。

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

创建数据库

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

结果:

 

posted @ 2017-02-03 15:01  宋兴柱  阅读(26661)  评论(1编辑  收藏  举报