gpt4 book ai didi

SQL 运算符优先级

转载 作者:行者123 更新时间:2023-12-02 14:57:25 25 4
gpt4 key购买 nike

如何

SELECT 80/9*9

SQL Server 中的结果 72

我点击了以下链接,但得到了不同的答案。 RedGate

最佳答案

正如 Juergen 所说,它们具有相同的优先级并且与 integer division它确实:

80/9 = 8 (as the remainder/decimal part is removed)

If an integer dividend is divided by an integer divisor, the result is an integer that has any fractional part of the result truncated.

然后:

8 * 9 = 72

关于SQL 运算符优先级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52295079/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com