#
# 1、连接数据库->登录数据库
# 2、退出数据库
# exit
# 3、显示所有数据库
# show database
# 4、进入数据库
# use db_test
# 5、增、删、改、查
# 5.1删除数据库
# drop database db_test;
# 5.2创建数据库
# create database db_test;
# 6、创建表
# create table t_student(id int(4) not null primary key, sname char(20));
# 7、插入表数据
# insert into t_student values(0,'JAR',0);
# 8、查询表数据
# select *from t_student;
# 8.1 根据条件查询
# select *from t_student where id=1;
# 9、改数据
# update t_student set s_name="Lilei" where s_name="Li Lei";
# 10、删除表数据
# delete from t_student where s_name='Lilei';
# 11、字段的修改
# 一、修改字段默认值
# alter table 表名 drop constraint 约束名字 ------说明:删除表的字段的原有约束
# alter table 表名 add constraint 约束名字 DEFAULT 默认值 for 字段名称 -------说明:添加一个表的字段的约束并指定默认值
# 二、修改字段名:
# alter table 表名 rename column A to B
# 三、修改字段类型:
# alter table 表名 alter column UnitPrice decimal(18, 4) not null
# 四、修改增加字段:
# alter table 表名 ADD 字段 类型 NOT NULL Default 0