MySQL数据库第6节——表查询关键字
发布时间
阅读量:
阅读量
前期表准备
# 如果cmd窗口展示数据时,窗口最大,展示数据的虚表仍有错位,应使用 \G 分行显示
select * from t1\G;
# 个别电脑在插入中文的时候会出现乱码或者空白的现象,可以将字符编码统一设置成 gbk
create table emp (
id int primary key auto_increment,
name varchar(20) not null,
sex enum("male", "female", "other") default "male", # 大部分是男的
age int unsigned not null default 28,
hire_date date not null,
post varchar(50),
post_comment varchar(100),
salary double(15, 2),
office int,
depart_id int
);
# 插入记录
# 三个部门:教学,销售,运营
insert into emp(name, sex, age, hire_date, post, salary, o
全部评论 (0)
还没有任何评论哟~
