摘要:
(1)查询所有产品的产品编号和销售额,并将销售额增加10%后设置别名为“增长额“ select 产品编号,销售额,销售额*0.1 as 增长额 from pro_sal; (2)查询“华中、华北、东南”地区的销售商名称和地区 select 销售商名称,地区 from saler where 地区 i 阅读全文
摘要:
1,统计各部门男员工,女员工的最高薪资 (员工) select 部门,if(性别=-1 or 性别='False','女','男') as 性别,max(目前薪资) as 最高薪资 from 员工 group by 部门,性别 2、统计各部门平均年龄(员工) select 部门,format(avg 阅读全文
摘要:
1.EL 表达式 a) 什么是 EL 表达式,EL 表达式的作用? EL 表达式的全称是:Expression Language。是表达式语言。 EL 表达式的什么作用:EL 表达式主要是代替 jsp 页面中的表达式脚本在 jsp 页面中进行数据的输出。因为 EL 表达式在输出数据的时候,要比 js 阅读全文
摘要:
1)每件商品的单件利润是多少? select name 商品名称,( outprice - inprice ) 商品单件利润 from tb1_commodity 2)查询进价大于等于10的商品信息 select name , inprice from tb1_commodity where inp 阅读全文
摘要:
1.查询后端用户且性别为1的有哪些有哪些(0:前端用户 1 后端用户) select * from easybuy_user where type=1 and sex=1 2.查询家住在海淀区创建时间为空的信息 select * from easybuy_user_address where add 阅读全文
摘要:
SQL查询语句详解(一) 一、基本语法 Select select_list From table_name Where condition_expression Group by group_columns having condition_expression Order by sort_col 阅读全文
摘要:
– 1.查询管理部目前薪资大于5ooo的员工的详细情况(员工) select * from 员工 where 部门='管理部' and 目前薪资>5000 – 2.统计各部门男员工,女员工的最高薪资〈员工) select 姓名, case 性别 when -1 then '女' when 0 the 阅读全文