zoukankan      html  css  js  c++  java
  • Day 34 作业(简单的查询)

    作业:
    	1. 查看岗位是teacher的员工姓名、年龄
    	2. 查看岗位是teacher且年龄大于30岁的员工姓名、年龄
    	3. 查看岗位是teacher且薪资在9000-1000范围内的员工姓名、年龄、薪资
    	4. 查看岗位描述不为NULL的员工信息
    	5. 查看岗位是teacher且薪资是10000或9000或30000的员工姓名、年龄、薪资
    	6. 查看岗位是teacher且薪资不是10000或9000或30000的员工姓名、年龄、薪资
    	7. 查看岗位是teacher且名字是jin开头的员工姓名、年薪
    
    //1. 查看岗位是teacher的员工姓名、年龄
    select name, age from staff_info where state = 'teacher'
    //2. 查看岗位是teacher且年龄大于30岁的员工姓名、年龄
    select name, age from staff_info where state = 'teacher' and age > 30
    //3. 查看岗位是teacher且薪资在9000-10000范围内的员工姓名、年龄、薪资
    select name, age, salary from staff_info where state = 'teacher' and salary between 9000 and 10000
    //4. 查看岗位描述不为NULL的员工信息
    select * from staff_info where state_desc is not null
    //5. 查看岗位是teacher且薪资是10000或9000或30000的员工姓名、年龄、薪资
    select name, age, salary from staff_info state = 'teacher' and salary in (10000, 9000, 30000)
    //6. 查看岗位是teacher且薪资不是10000或9000或30000的员工姓名、年龄、薪资
    select name, age, salary from staff_info state = 'teacher' and salary not in (10000, 9000, 30000)
    //7. 查看岗位是teacher且名字是jin开头的员工姓名、年薪
    select name, annual_salary from staff_info where state = 'teacher' and name like 'jin%'
    
  • 相关阅读:
    iOS真机调试 for Xcode 5
    iOS/iphone开发如何为苹果开发者帐号APPID续费
    unity3d中布娃娃系统
    U3D实现与iOS交互
    两种方法连接MySql数据库
    Unity3D Gamecenter 得分上传失败的处理
    Unity3.5 GameCenter基础教程(转载)
    判断数字正则表达式
    (转)SQL server 2005查询数据库表的数量和表的数据量
    C#操作PowerDesigner代码
  • 原文地址:https://www.cnblogs.com/2222bai/p/11759334.html
Copyright © 2011-2022 走看看