vue 三元运算符 语法_运算符之间SQL-语法示例解释

vue 三元运算符 语法

The BETWEEN Operator is useful because of the SQL Query Optimizer. Although BETWEEN is functionally the same as: x <= element <= y, the SQL Query Optimizer will recognize this command faster, and has optimized code for running it.

由于使用了SQL查询优化器,因此BETWEEN运算符很有用。 尽管BETWEEN在功能上与以下命令相同:x <= element <= y,但是SQL Query Optimizer将更快地识别此命令,并具有用于运行该命令的优化代码。

This operator is used in a WHERE clause or in a GROUP BY HAVING clause.

在WHERE子句或GROUP BY HAVING子句中使用此运算符。

Rows are selected that have a value greater than the minimum value and less than the maximum value.

选择的行的值大于最小值且小于最大值。

It’s important to keep in mind that the values entered in the command are  excluded  from the result. We get just what is between them.

重要的是要记住,从结果中排除在命令中输入的值。 我们得到他们之间的一切。

Here is the syntax for using the function in a WHERE Clause:

这是在WHERE子句中使用该函数的语法:

select field1, testField
from table1
where testField between min and max

Here is an example using the student table and the WHERE clause:

这是一个使用学生表和WHERE子句的示例:

-- no WHERE clause
select studentID, FullName, studentID
from student;
    
-- WHERE clause with between
select studentID, FullName, studentID
from student
where studentID between 2 and 7;

Here is an example using the campaign funds table and the having clause. This will return rows where the sum of the donations for a candidate are between $3 Million and $18 Million based on the HAVING clause in the GROUP BY part of the statement. More on aggregation in that guide.

这是使用竞选资金表和having子句的示例。 这将返回行,其中基于该语句的GROUP BY部分中的HAVING子句,候选人的捐款总额在300万美元至1800万美元之间。 该指南中有关聚合的更多信息。

select Candidate, Office_Sought, Election_Year, format(sum(Total_$),2)
from combined_party_data
where Election_Year = 2016
group by Candidate, Office_Sought, Election_Year
having sum(Total_$) between 3000000 and 18000000
order by sum(Total_$) desc;

翻译自: https://www.freecodecamp.org/news/sql-between-operator/

vue 三元运算符 语法

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值