建库和表的脚本.sql

1.一直都记不太清楚,需要新建一个数据库和表的脚本是怎样的,恰巧今天翻到了,特地记录下来,希望以后用的时候记住吧!

create database testdb00;
use testdb00;
create table userinfo(
 id                                        int not null auto_increment,
 name                                  varchar(20) not null,
age                                      int not null,
sex                                      tinyint(1) not null,
primary key (id)          
)

2.建好的效果:

原文地址:https://www.cnblogs.com/zhengyeye/p/5674181.html