mysql官方测试库安装

unzip test_db-master.zipcd test_db-mastermysql -u root -p*** -t < employees.sqlmysql -u root -p*** -t < employees_partitioned.sql测试安装的数据mysql -u root -p*** -t < test_employees_md5.sql...
摘要由CSDN通过智能技术生成

unzip test_db-master.zip
cd test_db-master
mysql -u root -p*** -t < employees.sql
mysql -u root -p*** -t < employees_partitioned.sql
测试安装的数据
mysql -u root -p*** -t < test_employees_md5.sql
mysql> show tables;
±---------------------+
| Tables_in_employees |
±---------------------+
| current_dept_emp | # 当前部门人数
| departments | # 部门
| dept_emp | # 部门总人数
| dept_emp_latest_date | # 最新的入离职信息
| dept_manager | # 部门经理
| employees | # 职员
| salaries | # 薪水
| titles | # 职称
±---------------------+

sql语句回顾
select database(); # 查看当前所在库
select user(); # 查看当前用户
select now(); # 查看当前时间
DESC table_name; # 查看表结构
show create table table_name # 查看表的创建信息
status # 查看当前数据库信息
show full processlist; # 查看当前所有正在执行的sql语句
show processlist; # 查看当前正在执行的sql语句前100条
avg() # 求平均值
count() # 求记录总数
distinct() # 去重

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值