1. 程式人生 > >mysql命令列建立表,插入表資料

mysql命令列建立表,插入表資料


create table t_hero(
id int unsigned auto_increment primary key,
name varchar(10) unique not null,
age tinyint unsigned default 0,
gender set("男", "女"),
state varchar(10)
);

 

 

insert into studentapp_student (name,age,sex,address)
values
("Lisa",20,"女","河北唐山"),
("張強",18,"男","河南安陽"),
("麗麗",28,"女","江蘇南京")