zoukankan      html  css  js  c++  java
  • day 34 作业

    作业

    mysql> create table tea(
        -> id int unsigned auto_increment primary key,
        -> name varchar(50),
        -> age int,
        -> salary int,
        -> desclib varchar(50) default null
        -> )charset=utf8;
        
    insert into tea(name,age,salary) values ('Jackie','19','9000');
    insert into tea(name,age,salary) values ('Coach','32','30000');
    insert into tea(name,age,salary) values ('Andy','26','15000');
    insert into tea(name,age,salary) values ('jinx','16','3500');
    
    # 1. 查看岗位是teacher的员工姓名、年龄
    select name,age from tea;
    
    # 2. 查看岗位是teacher且年龄大于30岁的员工姓名、年龄
    select name,age from tea where age>30;
    
    # 3. 查看岗位是teacher且薪资在9000-1000范围内的员工姓名、年龄、薪资
    select name,age,salary from tea where salary between 1000 and 9000;
    
    # 4. 查看岗位描述不为NULL的员工信息
    select * from tea where desclib is not null;
    
    # 5. 查看岗位是teacher且薪资是10000或9000或30000的员工姓名、年龄、薪资
    select name,age,salary from tea where salary in (10000,9000,30000)
    
    # 6. 查看岗位是teacher且薪资不是10000或9000或30000的员工姓名、年龄、薪资
    select name,age,salary from tea where salary not in (10000,9000,30000);
    
    # 7. 查看岗位是teacher且名字是jin开头的员工姓名、年薪
    select name,salary*12 from tea where name like 'jin%';
    
  • 相关阅读:
    SetupFactory7使用经验
    中值滤波C语言优化
    回归直线方程
    图像倾斜矫正方程基本的图像变换
    关于相机的一些概念
    VS如何自动创建函数头 函数说明
    自动打开虚拟机
    一些笔记jexcel
    linux 重启mysql redis等服务器
    handsontable 随记
  • 原文地址:https://www.cnblogs.com/colacheng0930/p/11761285.html
Copyright © 2011-2022 走看看